pgpool-II 4.2.20 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 2. Installation of Pgpool-II | Next |
This chapter describes the installation of Pgpool-II from RPM. If you are going to install from the source code, please check Section 2.2.
Pgpool-II community provides RPM packages for RHEL9/8/7 and the operating system which is compatible with RHEL. You can download package files from official Pgpool-II repository.
Pgpool-II official repository contains the following packages:
Table 2-1. Pgpool-II RPM Packages
Package | Description |
---|---|
pgpool-II-pgXX | Libraries and binaries required to run Pgpool-II |
pgpool-II-pgXX-extensions | This package must be installed on all PostgreSQL servers to use online recovery functionality |
pgpool-II-pgXX-debuginfo | Debug symbols for debugging |
pgpool-II-pgXX-debugsource | Only for RHEL8/9. Debug symbols for debugging |
pgpool-II-pgXX-extensions-debuginfo | Only for RHEL8/9. Debug symbols for debugging |
pgpool-II-pgXX-devel | Header files for developers |
Pgpool-II needs PostgreSQL's library and extensions directory. Since the directory paths are different in the particular PostgreSQL versions, Pgpool-II provides separate packages for each PostgreSQL version. "XX" in the above package is a two-digit number representing the version of PostgreSQL. Choose Pgpool-II RPM corresponding to your PostgreSQL version. (For example, if you are using PostgreSQL 13, you need to install pgpool-II-pg13)
Since Pgpool-II related packages are also included in PostgreSQL YUM repository, if PostgreSQL repository package is already installed, add the "exclude" settings to /etc/yum.repos.d/pgdg-redhat-all.repo, so that Pgpool-II will not be installed from PostgreSQL YUM repository. If Pgpool-II and PostgreSQL are installed on separate servers, you can skip this section.
vi /etc/yum.repos.d/pgdg-redhat-all.repo
The following is a setting example of /etc/yum.repos.d/pgdg-redhat-all.repo.
[pgdg-common] ... exclude=pgpool* [pgdg15] ... exclude=pgpool* [pgdg14] ... exclude=pgpool* [pgdg13] ... exclude=pgpool* [pgdg12] ... exclude=pgpool* [pgdg11] ... exclude=pgpool* [pgdg10] ... exclude=pgpool*
Here we install Pgpool-II using Pgpool-II official YUM repository.
The following commands assume that you are using Pgpool-II 4.2.x for PostgreSQL 13 on RHEL8. If you are using other versions, replace "pgXX" with your PostgreSQL version.
First, install the repository corresponding to your Pgpool-II version and distribution. For REHL7/9, see here.
dnf install https://www.pgpool.net/yum/rpms/4.2/redhat/rhel-8-x86_64/pgpool-II-release-4.2-2.noarch.rpm
Then, install Pgpool-II.
dnf install pgpool-II-pg13
To use online recovery feature, install pgpool-II-pg13-extensions on all PostgreSQL servers. Because pgpool-II-pgXX-extensions depends on pgpool-II-pgXX package, if Pgpool-II and PostgreSQL are installed on separate servers, pgpool-II-pgXX also need to be installed on PostgreSQL servers.
Note: pgpool-II-pgXX-extensions needs to be installed on the PostgreSQL servers. If Pgpool-II and PostgreSQL are installed on separate servers, it is not required to install it on the servers where Pgpool-II are running.
dnf install pgpool-II-pg13-extensions pgpool-II-pg13
Optionally you can install debuginfo and devel packages for developers if necessary.
dnf install pgpool-II-pg13-debuginfo pgpool-II-pg13-devel
All the Pgpool-II configuration files are installed in /etc/pgpool-II. Please refer to Section 3.3 to see how to set up configuration files.
On RHEL9/8/7, do this once, if set the automatic startup of Pgpool-II.
systemctl enable pgpool.service
After this, to start Pgpool-II, restart the whole system or do this. Please note that PostgreSQL servers must have been started before this.
systemctl start pgpool.service
To stop Pgpool-II, do this once. Please note that Pgpool-II must be stopped before stopping PostgreSQL.
systemctl stop pgpool.service
After this, you can stop PostgreSQL servers.