2.2. Installing repmgr from packages

2.2.1. RedHat/CentOS/Fedora
2.2.2. Debian/Ubuntu

We recommend installing repmgr using the available packages for your system.

2.2.1. RedHat/CentOS/Fedora

repmgr RPM packages for RedHat/CentOS variants and Fedora are available from the EDB public repository; see following section for details.

Note

Currently the EDB public repository provides support for RedHat/CentOS versions 6,7 and 8.

RPM packages for repmgr are also available via Yum through the PostgreSQL Global Development Group (PGDG) RPM repository (https://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 RPM packages are designed to be compatible with the community-provided PostgreSQL packages and EDB's PostgreSQL Extended Server (formerly 2ndQPostgres). They may not work with vendor-specific packages such as those provided by RedHat for RHEL customers, as the PostgreSQL filesystem layout may be different to the community RPMs. Please contact your support vendor for assistance.

See also FAQ entry Compatibility with third party vendor packages.

For more information on the package contents, including details of installation paths and relevant service commands, see the appendix section CentOS packages.

2.2.1.1. EDB public RPM yum repository

EDB provides a dedicated yum public repository for EDB 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://dl.enterprisedb.com/

  • Install the repository definition for your distribution and PostgreSQL version (this enables the EDB repository as a source of repmgr packages).

    For example, for PostgreSQL 14 on Rocky Linux 8, execute:

    curl https://dl.enterprisedb.com/default/release/get/14/rpm | sudo bash

    Verify that the repository is installed with:

    sudo dnf repolist

    The output should contain two entries like this:

    2ndquadrant-dl-default-release-pg14                  2ndQuadrant packages (PG14) for 8 - x86_64
    2ndquadrant-dl-default-release-pg14-debug            2ndQuadrant packages (PG14) for 8 - x86_64 - Debug

  • Install the repmgr version appropriate for your PostgreSQL version (e.g. repmgr14):

    sudo dnf install repmgr14

    Tip

    To determine the names of available packages, execute:

    dnf search repmgr

    In CentOS 7 and earlier, use yum instead of dnf.

Compatibility with PGDG Repositories

The EDB 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 EDB repository is always prioritised, set the priority option in the repository configuration file (e.g. /etc/yum.repos.d/2ndquadrant-dl-default-release-pg14.repo accordingly.

Note

With CentOS 7 and earlier, the package yum-plugin-priorities must be installed to be able to set the repository priority.

Installing a specific package version

To install a specific package version, execute dnf --showduplicates list for the package in question:

[root@localhost ~]# dnf --showduplicates list repmgr10
Last metadata expiration check: 0:09:15 ago on Fri 11 Mar 2022 01:09:19 AM UTC.
Installed Packages
repmgr10.x86_64                            5.3.1-1.el8                              @2ndquadrant-dl-default-release-pg10
Available Packages
repmgr10.x86_64                            5.0.0-1.rhel8                            pgdg10
repmgr10.x86_64                            5.1.0-1.el8                              2ndquadrant-dl-default-release-pg10
repmgr10.x86_64                            5.1.0-1.rhel8                            pgdg10
repmgr10.x86_64                            5.1.0-2.el8                              2ndquadrant-dl-default-release-pg10
repmgr10.x86_64                            5.2.0-1.el8                              2ndquadrant-dl-default-release-pg10
repmgr10.x86_64                            5.2.0-1.rhel8                            pgdg10
repmgr10.x86_64                            5.2.1-1.el8                              2ndquadrant-dl-default-release-pg10
repmgr10.x86_64                            5.3.0-1.el8                              2ndquadrant-dl-default-release-pg10
repmgr10.x86_64                            5.3.1-1.el8                              2ndquadrant-dl-default-release-pg10

then append the appropriate version number to the package name with a hyphen, e.g.:

[root@localhost ~]# dnf install repmgr10-5.3.0-1.el8

Installing old packages

See appendix Installing old package versions for details on how to retrieve older package versions.

2.2.2. Debian/Ubuntu

.deb packages for repmgr are available from the PostgreSQL Community APT repository (https://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.

2.2.2.1. EDB public apt repository for Debian/Ubuntu

EDB provides a public apt repository for EDB software, including repmgr.

General instructions for using this repository can be found on its homepage. Specific instructions for installing repmgr follow below.

Installation

  • Install the repository definition for your distribution and PostgreSQL version (this enables the EDB repository as a source of repmgr packages) by executing:

                  curl https://dl.enterprisedb.com/default/release/get/deb | sudo bash

    Note

    This will automatically install the following additional packages, if not already present:

    • lsb-release
    • apt-transport-https

  • Install the repmgr version appropriate for your PostgreSQL version (e.g. repmgr11):

                  sudo apt-get install postgresql-11-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.

Installing old packages

See appendix Installing old package versions for details on how to retrieve older package versions.