This site will be decommissioned on December 31st 2024. After that date content will be available at techdocs.broadcom.com.

This topic describes how to download and install or upgrade components of the VMware Postgres software distribution. The VMware Postgres software components are provided in 4 downloadable packages:

  • Postgres Server RPM – installs or upgrades all server and client components. This includes the PostgreSQL database, pgBackRest, pg_auto_failover, psql, and the ODBC driver.
  • Postgres Clients RPM – installs or upgrades only the client components, psql and the ODBC driver.
  • JDBC Driver for VMware Postgres – provides only the JDBC driver as a compressed ZIP file. This can be used on any machine as necessary for developing Java clients to PostgreSQL.
  • VMware Postgres Extensions – installs the RPM packages for VMware Postgres PL/Java, VMware Postgres PL/R, and PostGIS.

Prerequisites

  • Your deployment systems must meet the system requirements described in Supported Platforms.
  • You must have root permissions to install or upgrade the software.
  • Ensure that you have not installed Red Hat Enterprise Linux PostgreSQL on any system where you want to install VMware Postgres Server or VMware Postgres Clients. VMware Postgres software cannot be installed alongside RHEL PostgreSQL at this time.
  • The VMware Postgres PL/R Extension requires R to be installed before the RPM can be installed. See Installing the VMware Postgres PL/R Extension.

Installing the Postgres Server RPM

Perform this procedure on each host that will run VMware Postgres. Note that this process also installs the psql and ODBC driver client components to each machine:

  1. Download the VMware Postgres Server RPM distribution from VMware Tanzu Network. The Postgres Server download filename has the format: vmware-postgres<version>-<vmware-version>.<platform>.<architecture>.zip, for example vmware-postgres14-14.6.0.el7.x86_64.zip.

  2. Log in to your system as root, or use sudo in the next step to acquire root privileges.

  3. Navigate to the downloaded RPM file and install it using the yum utility. For example:

    cd ~/Downloads/vmware-postgres-14.*
    yum install ./vmware-postgres14-14.6-0.el7.x86_64.rpm
    
  4. The VMware Postgres RPM installation creates the postgres user and sets the PGDATA and PATH environment variables in ~postgres/.bash_profile. If the .bash_profile exists prior to installation, it will not be modified. It also creates the directory /var/lib/pgsql/data, owned by the postgres user, which you can specify for the data directory when you initialize your PostgreSQL instance. This example initializes the data directory:

    su --login postgres
    source ~/.bash_profile
    initdb -D /var/lib/pgsql/data
    
  5. If you are creating a High Availability configuration, you will initialize the Postgres instances as part of the pg_auto_failover or Patroni setup. For more details refer to Creating a High Availability cluster.

  6. If you are creating a single non-HA Postgres server, start it by running:

    postgres -D /var/lib/pgsql/data >/var/lib/pgsql/data/logfile 2>&1 &
    
  7. Continue to set up and start the PostgreSQL server, as described in Server Setup and Operation in the PostgreSQL documentation.

  8. Follow the instructions in Configuring and Using VMware Postgres to configure PostgreSQL with pgBackRest, psqlODBC, and pgjdbc.

Installing the VMware Postgres Client RPM

Perform this procedure on each host that will act only as a client to the VMware Postgres instance.

Important: Do not install the client package on any machine that has a PostgreSQL server.

  1. Download the Postgres Clients RPM distribution from VMware Tanzu Network. The download filename has the format: vmware-postgres-clients-<vmware-version>.<platform>.<architecture>.zip, for example vmware-postgres-clients-14.6.0.el7.x86_64.zip.

  2. Log in to your system as root, or use sudo in the next step to acquire root privileges.

  3. Navigate to the downloaded RPM file and install it using the yum utility. For example:

    cd ~/Downloads/vmware-postgres-14*
    yum install ./vmware-postgres-clients-14.6-0.el7.x86_64.rpm
    

Installing the VMware Postgres JDBC Driver

  1. Download the VMware Postgres Postgres Clients for RHEL7 from VMware Tanzu Network. The JDBC driver file name inside the zip file has the format: vmware-postgres-jdbc-<jdbc-version>.jar.

  2. Unzip the downloaded file to obtain the driver JAR file. For example:

    unzip vmware-postgres-clients-<vmware-version>-0.el7.x86_64.zip
    
  3. The JDBC driver JAR is not installed at the system level; simply include it in your Java CLASSPATH as necessary to connect using the driver. See Setting up the Class Path in the JDBC Driver documentation for more information.

Installing the VMware Postgres Extensions

The VMware Postgres Server and Extensions download from VMware Tanzu Network includes RPM packages for VMware Postgres PL/Java, VMware Postgres PL/R, Orafce, PgBouncer, and PostGIS. Follow these steps to download and install these extensions.

On the Postgres server, extract the RPM packages from the Extensions for VMware Postgres Server download file.

unzip vmware-postgres-extensions-<postgres-version>.<platform>.zip

To install the extensions see PL/Java, PL/R, and PostGIS.

PL/Java

  1. Install the PL/Java extension RPM.

    sudo yum install vmware-postgres<postgres-version>-pljava-extension-<pljava-version>.el7.x86_64.rpm
    
  2. The following commands create the PL/JAVA extension in a Postgres database.

    su postgres
    psql test
    #= set pljava.libjvm_location TO '/lib/jvm/jre/lib/amd64/server/libjvm.so';
    #= CREATE EXTENSION pljava;
    

See the PL/Java project information site for information about using PL/Java.

PL/R

  1. Install R from the EPEL repo before you install the VMware Postgres PL/R RPM, so yum can find R.

    sudo yum install epel-release
    
  2. Install the PL/R extension.

    sudo yum install vmware-postgres<version>-plr-extension-<plr-version>.<platform>.rpm
    
  3. Enable the PL/R extension in each Postgres database where it will be used. For example, these commands register the PL/R language in the database named test.

    su postgres
    psql -d testdb -c 'CREATE EXTENSION plr;'
    

See PL/R Project for more about PL/R. See The R Project for Statistical Computing for information about available R packages.

PostGIS

Follow these steps to install the VMware Postgres PostGIS RPM.

  1. Install the VMware Postgres PostGIS RPM.

    yum install vmware-postgres<version>-postgis-extension-<postgres-version>.<platform>.rpm
    
  2. Create the PostGIS extension in each database where you want to use PostGIS.
    Note: Do not install the extension in the postgres database.

    su postgres
    createdb testdb
    psql -d testdb -c 'CREATE EXTENSION postgis;'
    

See the PostGIS web site for information about using PostGIS.

Patroni

Follow these steps to install the VMware Postgres Patroni RPM.

  1. Install the VMware Postgres Patroni RPM.

    yum install vmware-postgres<version>-patroni-<patroni-version>.<platform>.rpm
    
  2. Use the Patroni setup page for guidance on configuration.

check-circle-line exclamation-circle-line close-line
Scroll to top icon