Installation Instructions for repmgr

2ndQuadrant Yum Repository

Beginning with v3.1.3, 2ndQuadrant provides a dedicated Yum repository for repmgr releases. This repository complements the main PGDG repository, but enables repmgr users to access the latest repmgr packages before they are available via PGDG.

Supported distributions and architectures

This repository currently supports following distributions on x86_64 architecture:

  •   Fedora 25
  •   RHEL 6 (and derivatives)
  •   RHEL 7 (and derivatives)

RHEL packages will work on CentOS and other RHEL derivatives.

Installation

  • Import the repository public key (optional but recommended)
rpm --import http://packages.2ndquadrant.com/repmgr/RPM-GPG-KEY-repmgr
$ yum install http://packages.2ndquadrant.com/repmgr/yum-repo-rpms/repmgr-rhel-1.0-1.noarch.rpm

Loaded plugins: fastestmirror
Setting up Install Process
repmgr-rhel-1.0-1.noarch.rpm                                           | 4.5 kB     00:00
(...)
Dependencies Resolved

==============================================================================================
Package              Arch            Version        Repository                          Size
==============================================================================================
Installing:
repmgr-rhel          noarch          1.0-1          /repmgr-rhel-1.0-1.noarch          1.9 k

Transaction Summary
==============================================================================================
Install       1 Package(s)

Total size: 1.9 k
Installed size: 1.9 k
Is this ok [y/N]: y

(...)

Installed:
  repmgr-rhel.noarch 0:1.0-1

Complete!
  • Install the repmgr version appropriate for your PostgreSQL version (e.g. repmgr96)
# yum install repmgr96 
Loaded plugins: fastestmirror, langpacks 
Setting up Install Process 
(...) 

Dependencies Resolved

==============================================================================================
 Package            Arch             Version               Repository                    Size
==============================================================================================
Installing:
 repmgr96           x86_64           4.0.0-1.rhel7           pgdg96​​​​​​​                      181 k

Transaction Summary
==============================================================================================
Install       1 Package(s)

Total download size: 181 k
Installed size: 726 k
Is this ok [y/N]: y
Downloading Packages:
repmgr96-4.0.0-1.rhel7.x86_64.rpm​​​​​​​                                        | 181 kB     00:00:13

(...)

Installed:
  repmgr96.x86_64 0:4.0.0-1.rhel7​​​​​​​

Complete!

Compatibility with PGDG Repositories

The 2ndQuadrant repmgr yum repository uses exactly the same package definitions as the main PGDG repository and is effectively a selective mirror for repmgr packages only. Normally yum should 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 is always prioritised, install "yum-plugin-priorities" and set the repository priorities accordingly.

 

PGDG Apt Repository

The instructions below are valid for Debian and all Linux flavors based on Debian (e.g. Ubuntu).

Pre-Requisites

In order to use PGDG repository, first perform the following steps:

  • To point to production repos, Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example below, replace wheezy with the actual distribution you are using (You may determine the codename of your distribution by running lsb_release -c):
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
  • For a shorthand version of the above:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  • To point to testing repos to get test releases (eg. Alpha, Beta) , Create /etc/apt/sources.list.d/pgdg-testing.list. The distributions are called codename-pgdg-testing. In the example below, replace wheezy with the actual distribution you are using (You may determine the codename of your distribution by running lsb_release -c):
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg-testing main
  • For a shorthand version of the above:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg-testing main" > /etc/apt/sources.list.d/pgdg-testing.list'
  • Import the repository key from https://www.postgresql.org/media/keys/ACCC4CF8.asc, update the package lists, and start installing packages
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-9.6

 

Installing Repmgr

Once pre-requisites are complete, installing repmgr is simply a matter of executing the following for your version of PostgreSQL:

From production repos:

PostgreSQL 9.4: sudo apt-get install postgresql-9.4-repmgr
PostgreSQL 9.5: sudo apt-get install postgresql-9.5-repmgr
PostgreSQL 9.6: sudo apt-get install postgresql-9.6-repmgr

From testing repos:

PostgreSQL 9.3: sudo apt-get install -t $(lsb_release -cs)-pgdg-testing postgresql-9.3-repmgr
PostgreSQL 9.4: sudo apt-get install -t $(lsb_release -cs)-pgdg-testing postgresql-9.4-repmgr
PostgreSQL 9.5: sudo apt-get install -t $(lsb_release -cs)-pgdg-testing postgresql-9.5-repmgr
PostgreSQL 9.6: sudo apt-get install -t $(lsb_release -cs)-pgdg-testing postgresql-9.6-repmgr
PostgreSQL 10: sudo apt-get install -t $(lsb_release -cs)-pgdg-testing postgresql-10-repmgr

Bleiben Sie in Kontakt mit uns.

Abonnieren Sie unseren Newsletter (ca. 4 Ausgaben pro Jahr), um die neuesten Entwicklungen von 2ndQuadrant und PostgreSQL zu lesen.

Wir senden Ihnen auch alle wichtigen News oder Updates, von denen wir annehmen, daß sie für Sie nützlich sind.

Wir schätzen Ihre Privatsphäre und werden keine persönlichen Daten an Dritte weitergegeben.