Installing or Upgrading Pivotal Postgres
This topic describes how to download and install or upgrade components of the Pivotal Postgres software distribution. The Pivotal Postgres software components are provided in 3 downloadable packages:
- Postgres Server RPM–installs or upgrades all server and client components. This includes the PostgreSQL database, Replication Manager (
repmgr
),psql
, and the ODBC driver. - Postgres Clients RPM–installs or upgrades only the client components,
psql
and the ODBC driver. - JDBC Driver for Pivotal 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.
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 Pivotal Postgres Server or Pivotal Postgres Clients. Pivotal Postgres software cannot be installed alongside RHEL PostgreSQL at this time.
Installing the Postgres Server RPM
Perform this procedure on each host that will participate in the Pivotal Postgres cluster. Note that this process also installs the psql
and ODBC driver client components to each machine:
Download the Pivotal Postgres Server RPM distribution from Pivotal Network. The Postgres Server download filename has the format:
pivotal-postgres-<postgres-version>-<pivotal-version>.<platform>.<architecture>.rpm
.Login to your system as
root
, or usesudo
in the next step as necessary to acquireroot
privileges.Navigate to the downloaded RPM file and install it using the
yum
utility. For example:$ cd ~/Downloads $ yum install pivotal-postgres-11.2-1.el7.x86_64.rpm
Continue to set up and start the PostgreSQL server, as described in Server Setup and Operation in the PostgreSQL documentation.
Follow the instructions in Configuring and Using Pivotal Postgres to configure the PostgreSQL cluster with
repmgr
.
Installing the Pivotal Postgres Client RPM
Perform this procedure on each host that will act only as a client to the Pivotal Postgres cluster.
Note: The Pivotal Postgres Client package is not required on Postgres Server machines, and you cannot install the client package on any machine that has a PostgreSQL server or repmgr
installation.
Download the Pivotal Postgres Client RPM distribution from Pivotal Network. The download filename has the format:
pivotal-postgres-clients-<postgres-version>-<pivotal-version>.<platform>.<architecture>.rpm
.Login to your system as
root
, or usesudo
in the next step as necessary to acquireroot
privileges.Navigate to the downloaded RPM file and install it using the
yum
utility. For example:$ cd ~/Downloads $ yum install pivotal-postgres-clients-11.2-1.el7.x86_64.rpm
Installing the Pivotal Postgres JDBC Driver
Download the Pivotal Postgres JDBC driver software distribution from Pivotal Network. The JDBC driver download filename has the format:
pivotal-postgres-<postgres-version>-jdbc-driver.zip
.Unzip the downloaded file to obtain the driver JAR file. For example:
$ unzip pivotal-postgres-11.2-jdbc-driver.zip
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.
Upgrading an Existing Pivotal Postgres Installation
To upgrade an existing Pivotal Postgres installation, use the yum update
command (instead of yum install
) with the new RPM download. For example, to upgrade from an earlier Pivotal Postgres release to version 11.2, execute the following commands as root
:
$ cd ~/Downloads
$ yum upgrade pivotal-postgres-11.2-1.el7.x86_64.rpm
You cannot directly upgrade from the previous Pivotal Postgres release to the current Pivotal Postgres Client package. If you want to install the Pivotal Postgres Clients on a machine that has the previous Pivotal Postgres packages installed, you must first remove those packages. For example:
$ cd ~/Downloads
$ yum remove pivotal-postgres
$ yum install pivotal-postgres-clients-11.2-1.el7.x86_64.rpm
Note that the Postgres JDBC driver is not installed as an RPM. Simply extract and use the newer JAR file in your CLASSPATH
.