repmgr 4.0.6 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 2. Installation | Next |
We recommend installing repmgr using the available packages for your system.
repmgr RPM packages for RedHat/CentOS variants and Fedora are available from the 2ndQuadrant public RPM repository; see following section for details.
RPM packages for repmgr are also available via Yum through the PostgreSQL Global Development Group RPM repository (http://yum.postgresql.org/). Follow the instructions for your distribution (RedHat, CentOS, Fedora, etc.) and architecture as detailed there. Note that it can take some days for new repmgr packages to become available via the this repository.
Note: repmgr packages are designed to be compatible with the community-provided PostgreSQL packages. They may not work with vendor-specific packages such as those provided by RedHat for RHEL customers, as the filesystem layout may be different to the community RPMs. Please contact your support vendor for assistance.
For more information on the package contents, including details of installation paths and relevant service commands, see the appendix section CentOS packages.
Note: 2ndQuadrant previously provided a dedicated repmgr repository at http://packages.2ndquadrant.com/repmgr/. This repository will be deprecated in a future release as it is now replaced by the public RPM repository documented below.
Beginning with repmgr 4.0.5, 2ndQuadrant provides a dedicated yum public RPM repository for 2ndQuadrant software, including repmgr. We recommend using this for all future repmgr releases.
General instructions for using this repository can be found on its homepage. Specific instructions for installing repmgr follow below.
Installation
Locate the repository RPM for your PostgreSQL version from the list at: https://rpm.2ndquadrant.com/
Install the repository RPM for your distribution and PostgreSQL version (this enables the 2ndQuadrant repository as a source of repmgr packages).
For example, for PostgreSQL 10 on CentOS, execute:
sudo yum install https://rpm.2ndquadrant.com/site/content/2ndquadrant-repo-10-1-1.el7.noarch.rpm
Verify that the repository is installed with:
sudo yum repolist
The output should contain two entries like this:
2ndquadrant-repo-10/7/x86_64 2ndQuadrant packages for PG10 for rhel 7 - x86_64 1 2ndquadrant-repo-10-debug/7/x86_64 2ndQuadrant packages for PG10 for rhel 7 - x86_64 - Debug 1
Install the repmgr version appropriate for your PostgreSQL version (e.g. repmgr10):
$ yum install repmgr10
Compatibility with PGDG Repositories
The 2ndQuadrant repmgr yum repository packages use the same definitions and file system layout as the main PGDG repository.
Normally yum will prioritize the repository with the most recent repmgr version. Once the PGDG repository has been updated, it doesn't matter which repository the packages are installed from.
To ensure the 2ndQuadrant repository is always prioritised, install yum-plugin-priorities and set the repository priorities accordingly.
Installing a specific package version
To install a specific package version, execute yum --showduplicates list for the package in question:
[root@localhost ~]# yum --showduplicates list repmgr10 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp Available Packages repmgr10.x86_64 4.0.3-1.rhel7 pgdg10 repmgr10.x86_64 4.0.4-1.rhel7 pgdg10 repmgr10.x86_64 4.0.5-1.el7 2ndquadrant-repo-10
then append the appropriate version number to the package name with a hyphen, e.g.:
[root@localhost ~]# yum install repmgr10-4.0.3-1.rhel7
.deb packages for repmgr are available from the PostgreSQL Community APT repository (http://apt.postgresql.org/). Instructions can be found in the APT section of the PostgreSQL Wiki (https://wiki.postgresql.org/wiki/Apt).
For more information on the package contents, including details of installation paths and relevant service commands, see the appendix section Debian/Ubuntu packages.
Beginning with repmgr 4.0.5, 2ndQuadrant provides a public apt repository for 2ndQuadrant software, including repmgr.
General instructions for using this repository can be found on its homepage. Specific instructions for installing repmgr follow below.
Installation
If not already present, install the apt-transport-https package:
sudo apt-get install apt-transport-https
Create /etc/apt/sources.list.d/2ndquadrant.list as follows:
sudo sh -c 'echo "deb https://apt.2ndquadrant.com/ $(lsb_release -cs)-2ndquadrant main" > /etc/apt/sources.list.d/2ndquadrant.list'
Install the 2ndQuadrant repository key:
sudo apt-get install curl ca-certificates curl https://apt.2ndquadrant.com/site/keys/9904CD4BD6BAF0C3.asc | sudo apt-key add -
Update the package list
sudo apt-get update
Install the repmgr version appropriate for your PostgreSQL version (e.g. repmgr10):
$ apt-get install postgresql-10-repmgr
Note: For packages for PostgreSQL 9.6 and earlier, the package name includes a period between major and minor version numbers, e.g. postgresql-9.6-repmgr.