Installing Java for PXF
PXF is a Java service. It requires a Java 8 or Java 11 installation on each Greenplum Database host.
Ensure that you have access to, or superuser permissions to install, Java 8 or Java 11 on each Greenplum Database host.
Perform the following procedure to install Java on the master, standby master, and on each segment host in your Greenplum Database cluster. You will use the
gpssh utility where possible to run a command on multiple hosts.
Log in to your Greenplum Database master node:
$ ssh gpadmin@<gpmaster>
Determine the version(s) of Java installed on the system:
gpadmin@gpmaster$ rpm -qa | grep java
If the system does not include a Java version 8 or 11 installation, install one of these Java versions on the master, standby master, and on each Greenplum Database segment host.
Create a text file that lists your Greenplum Database standby master host and segment hosts, one host name per line. For example, a file named
gpmaster mstandby seghost1 seghost2 seghost3
Install the Java package on each host. For example, to install Java version 8:
gpadmin@gpmaster$ gpssh -e -v -f gphostfile sudo yum -y install java-1.8.0-openjdk-1.8.0*
Identify the Java 8 or 11
$JAVA_HOMEsetting for PXF. For example:
If you installed Java 8:
If you installed Java 11:
If the superuser configures the newly-installed Java alternative as the system default:
$JAVA_HOMEsetting; you provide this value when you initialize PXF.