Installing Pgpool-II v1.0

Edit this page

Pgpool-II runs as a service on Linux systems. Windows systems does not support Pgpool. The Pgpool version required by your EDB Postgres Advanced Server and PostgreSQL installation is version-specific, but the documented and supported functionality of each version is the same. The following table lists the Pgpool version and their corresponding EDB Postgres Advanced Server and PostgreSQL versions. The information in this guide applies to each version listed in the table below.

Pgpool VersionPostgres VersionSupported Platforms
Pgpool 4.2EDB Postgres Advanced Server and PostgreSQL 13RHEL 7 - x86_64, RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch and 10x Buster
Ubuntu 18.04 LTS Bionic Beaver and Ubuntu 20.04 LTS Focal Fossa
Pgpool 4.2EDB Postgres Advanced Server and PostgreSQL 12RHEL 7 - x86_64, and RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch and 10x Buster
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 4.2EDB Postgres Advanced Server and PostgreSQL 11RHEL 7 - x86_64, RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 4.2EDB Postgres Advanced Server and PostgreSQL 9.6 and 10RHEL 7 - x86_64 and RHEL 7 - ppc64le
Pgpool 4.1EDB Postgres Advanced Server 13RHEL 7 - x86_64, RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch and 10x Buster
Ubuntu 18.04 LTS Bionic Beaver and Ubuntu 20.04 LTS Focal Fossa
Pgpool 4.1EDB Postgres Advanced Server 12RHEL 7 - x86_64, and RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch and 10x Buster
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 4.1EDB Postgres Advanced Server 11RHEL 7 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 4.0EDB Postgres Advanced Server 12RHEL 7 - x86_64, and RHEL 8 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch and 10x Buster
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 4.0EDB Postgres Advanced Server 11RHEL 7 - x86_64
RHEL 7 - ppc64le
Debian 9x Stretch
Ubuntu 18.04 LTS Bionic Beaver
SLES 12
Pgpool 3.7EDB Postgres Advanced Server 10 and 11RHEL 7 - x86_64 and RHEL 7 - ppc64le
Pgpool 3.6EDB Postgres Advanced Server 9.6 and 10RHEL 7 - x86_64
RHEL 7 - ppc64le
Linux graphical installer
Note
  • Pgpool does not support CentOS/RHEL/OEL 6.x platforms. EDB recommends migrating EDB products running on CentOS/RHEL/OEL 6.x platforms to a supported platform.
  • Pgpool is certified with the Pgpool-II extensions shipped with EDB Postgres Advanced Server and PostgreSQL.

This guide assumes that the user has some knowledge of installation and system administration procedures and has administrative privileges on the host.

Before installing the repository configuration, you must have credentials that allow access to the EDB repository. For information about requesting credentials, visit the EDB website.

Installing Pgpool-II on a CentOS Host

Perform the following steps to install Pgpool-II on a CentOS host:

  1. To install the repository configuration, assume superuser privileges and invoke one of the following platform-specific commands:

    On CentOS 7:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On CentOS 8:

    dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  2. Replace the USERNAME:PASSWORD variable in the following command with the username and password of a registered EDB user:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  3. Before installing Pgpool-II, execute the following command to install the Extra Packages for Enterprise Linux (EPEL):

    On CentOS 7:

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    On CentOS 8:

    dnf -y install epel-release
  4. For CentOS 8, enable the PowerTools repository to satisfy additional package dependencies:

    dnf config-manager --set-enabled PowerTools
  5. For CentOS 8, disable the built-in PostgreSQL module:

    dnf -qy module disable postgresql
  6. Use the platform-specific command to install Pgpool-II:

    On CentOS 7:

    yum install edb-pgpool<xx>

    On CentOS 8:

    dnf install edb-pgpool<xx>

    Where <xx> is the Pgpool release version.

    For example, to install the latest Pgpool Version 4.2, execute the following command:

    On CentOS 7:

    yum install edb-pgpool42

    On CentOS 8:

    dnf install edb-pgpool42

    When you install an RPM package signed by a source that is not recognized by your system, your permission to import the key to your local server may be asked. If prompted, and you are satisfied that the packages come from a trustworthy source, enter y and press Return to continue.

    Pgpool-II is installed in the /usr/edb/pgpool<x.y>/ directory, where <x.y> is the installed Pgpool-II version number. The configuration files are created in the /etc/sysconfig/edb/pgpool<x.y> directory, where <x.y> is the Pgpool release version. By default, .sample is appended to the configuration file name; remove the .sample from the configuration file after copying the file to create your custom configuration.

Installing Pgpool-II on an RHEL Host

Before creating the repository configuration file, you must have credentials that allow access to the EDB repository. For information about requesting credentials, visit the EDB website.

Perform the following steps to install Pgpool-II:

  1. To create the repository configuration file, assume superuser privileges and invoke one of the following platform-specific commands:

    On RHEL 7:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm

    On RHEL 8:

    dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  2. Replace the USERNAME:PASSWORD variable in the following command with the username and password of a registered EDB user:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  3. Before installing Pgpool, execute the following command to install the Extra Packages for Enterprise Linux (EPEL):

    On RHEL 7:

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    On RHEL 8:

    dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  4. Enable the repository:

    On RHEL 7, enable the optional, extras, and HA repositories to satisfy additional package dependencies:

    subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

    On RHEL 8, enable the codeready-builder-for-rhel-8-*-rpms repository to satisfy additional package dependencies:

    ARCH=$( /bin/arch )
    
    subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
  5. For RHEL 8, disable the built-in PostgreSQL module:

    dnf -qy module disable postgresql
  6. Use the platform-specific command to install Pgpool-II:

    On RHEL 7:

    yum install edb-pgpool<xx>

    On RHEL 8:

    dnf install edb-pgpool<xx>

    Where <xx> is the Pgpool release version.

    For example, to install the latest Pgpool Version 4.2, execute the following command:

    On RHEL 7:

    yum install edb-pgpool42

    On RHEL 8:

    dnf install edb-pgpool42

    When you install an RPM package that is signed by a source that is not recognized by your system, your permission to import the key to your local server may be asked for. If prompted, and you are satisfied that the packages come from a trustworthy source, enter y, and press Return to continue.

    Pgpool-II will be installed in the /usr/edb/pgpool<x.y>/ directory, where <x.y> is the installed Pgpool-II version number. The configuration files are created in the /etc/sysconfig/edb/pgpool<x.y> directory, where <x.y> is the Pgpool release version. By default, .sample is appended to the configuration file name; remove the .sample from the configuration file after copying the file to create your custom configuration.

Installing Pgpool-II on an RHEL/CentOS 7 PPCLE Host

Before creating the repository configuration file, you must have credentials that allow access to the EDB repository. For information about requesting credentials, visit the EDB website.

Perform the following steps to install Pgpool-II on an RHEL/CentOS 7 PPC64LE Host:

  1. Install Advance Toolchain:

    rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b
    
    cat > /etc/yum.repos.d/advance-toolchain.repo <<EOF
    
    # Beginning of the configuration file
    [advance-toolchain]
    name=Advance Toolchain IBM FTP
    baseurl=https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7
    failovermethod=priority
    enabled=1
    gpgcheck=1
    gpgkey=ftp://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHELX/gpg-pubkey-6976a827-5164221b
    # End of the configuration file
  2. To create the repository configuration file, assume superuser privileges and invoke the following command:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  3. Replace the USERNAME:PASSWORD variable in the following command with the username and password of a registered EDB user:

    sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  4. Before installing Pgpool-II, execute the following command to install the Extra Packages for Enterprise Linux (EPEL):

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  5. On RHEL 7, enable the optional, extras, and HA repositories to satisfy additional package dependencies:

    subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"
  6. Invoke the following command to install Pgpool-II:

    yum -y install edb-pgpool<xx>

    Where <xx> is the Pgpool-II version you want to install.

Installing Pgpool-II on a Debian/Ubuntu Host

To install Pgpool-II on a Debian or Ubuntu host, you must have credentials that allow access to the EDB repository. To request credentials for the repository, visit the EDB website.

The following steps walk you through using the EDB apt repository to install a Debian package. When using the commands, replace the username and password with the credentials provided by EDB.

  1. Assume superuser privileges:

    sudo su –
  2. Configure access to the EDB repository on your system:

    On Debian 9, Ubuntu 18, and Ubuntu 20:

    sh -c 'echo "deb https://username:password@apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

    On Debian 10:

    a. Set up the EDB repository:

    sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

    b. Substitute your EDB credentials for the username and password placeholders in the following command:

    sh -c 'echo "machine apt.enterprisedb.com login <username> password <password>" > /etc/apt/auth.conf.d/edb.conf'
  3. Add support to your system for secure APT repositories:

    apt-get install apt-transport-https
  4. Add the EDB signing key:

    wget -q -O - https://apt.enterprisedb.com/edb-deb.gpg.key  | sudo apt-key add -
  5. Update the repository metadata:

    apt-get update
  6. Install the Debian package:

    apt-get install -y edb-pgpool<xx>

Where <xx> is the Pgpool release version.

After installing Pgpool-II on a Debian host, the configuration files are located in the /etc/edb/edb-pgpool<x.y> directory, where <x.y> is the Pgpool release version. By default, .sample is appended to the configuration file name; .sample should be removed after copying the file to create your custom configuration.

Installing Pgpool-II on a SLES 12 Host

You can use the Zypper package manager to install Pgpool-II on a SLES 12 host. Zypper will attempt to satisfy package dependencies but requires access to specific repositories that EDB does not host.

  1. Assume superuser privileges.

    sudo su -
  2. Use the following command to add the EDB repository to your SLES host:

    zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo
  3. Invoke the following command to refresh the metadata:

    zypper refresh
  4. Install SUSEConnect to register the host with SUSE to allow access to SUSE repositories:

    zypper install SUSEConnect
  5. Register the host with SUSE to allow access to SUSE repositories and replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE registration information:

    SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL'
    SUSEConnect -p PackageHub/12.4/x86_64
    SUSEConnect -p sle-sdk/12.4/x86_64
  6. Install the following repository for PEM dependencies:

    zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP4/Apache:Modules.repo
  7. Refresh the metadata:

    zypper refresh
  8. Install OpenJDK (version 1.8) for Java-based components:

    zypper -n install java-1_8_0-openjdk
  9. Then, use the Zypper utility to install Pgpool-II:

    zypper install -n edb-pgpool<xx>

    Where <xx> is the Pgpool version you wish to install.

Installing Pgpool-II Using the Linux Graphical Installer

Graphical installers for Pgpool-II are available via StackBuilder Plus (for EDB Postgres Advanced Server hosts) or Stack Builder (on PostgreSQL hosts). You can access StackBuilder Plus through your Linux start menu. Pgpool does not support Windows systems.

Perform the following steps to install Pgpool-II:

  1. Open StackBuilder Plus and select your EDB Postgres Advanced Server installation from the drop-down list on the Welcome window. Click Next to continue to the application selection page. Expand the Add-ons, tools and utilities node, and check the box next to the Pgpool-II version you want to install and download the Pgpool-II installer. Click Next to continue. Provide the credentials and click Next.
  2. The selected packages and the default download directory are displayed. Change the download directory location if required. Click Next.
  3. Once you have downloaded the installation files, a confirmation message is displayed. Click Next to start the Pgpool-II installation.
  4. Select an installation language and click OK.
  5. The Pgpool installer welcomes you to the setup wizard.

The Pgpool-II Welcome window

Fig. 1: The Pgpool-II Welcome window

  1. Use the Installation Directory field to specify the directory where you would install the Pgpool-II software (the default installation directory is /opt/edb). Then, click Next to continue.

The Pgpool-II Installation Details Window

Fig. 2: The Pgpool-II Installation Details Window

  1. Use the Operating System User field to specify the Linux operating system user's name that Pgpool-II will change to after startup. Then, click Next to continue.

The Pgpool-II Operating User window

Fig. 3: The Pgpool-II Operating User window

  1. The Ready to Install window notifies you when the installer has all of the information needed to install Pgpool-II on your system. Click Next to install Pgpool-II.

The Ready to Install window

Fig. 4: The Ready to Install window

  1. Progress bars inform you as the installation progresses.

The installation progresses

Fig. 5: The installation progresses

  1. The installer notifies you when the setup wizard has completed the Pgpool-II installation. Click Finish to exit the installer.

The installation is complete

Fig. 6: The installation is complete