Installing Java for PXF

A newer version of this documentation is available. Use the version menu above to view the most up-to-date release of the Greenplum 5.x documentation.

PXF is a Java service. It requires a 1.8 installation on each Greenplum Database segment host.

If an appropriate version of PXF is already installed on each Greenplum Database segment host, you need not perform the procedure in this topic.


Ensure that you have access to, or superuser permissions to install, Java version 1.8 on each Greenplum Database host.


Perform the following procedure to install Java on each segment host in your Greenplum Database cluster. You will use the gpssh utility where possible to run a command on multiple hosts.

  1. Log in to your Greenplum Database master node and set up the environment:

    $ ssh gpadmin@<gpmaster>
    gpadmin@gpmaster$ . /usr/local/greenplum-db/
  2. Create a text file that lists your Greenplum Database segment hosts, one host name per line. For example, a file named seghostfile may include:

  3. Install Java on each Greenplum Database segment host and set up the Java environment on each host.

    1. Install the Java package. For example, to install Java version 1.8:

      gpadmin@gpmaster$ gpssh -e -v -f seghostfile sudo yum -y install java-1.8.0-openjdk-1.8.0*
    2. Identify the Java base install directory. Update the gpadmin user’s .bash_profile file on each segment host to include this $JAVA_HOME setting if it is not already present. For example:

      gpadmin@gpmaster$ gpssh -e -v -f seghostfile "echo 'export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.x86_64/jre' >> /home/gpadmin/.bash_profile"