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 24
  •   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
Setting up Install Process
(...)
Dependencies Resolved

==============================================================================================
 Package            Arch             Version               Repository                    Size
==============================================================================================
Installing:
 repmgr96           x86_64           3.3.2.el6           2ndquadrant-repmgr           118 k

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

Total download size: 118 k
Installed size: 452 k
Is this ok [y/N]: y
Downloading Packages:
repmgr96-3.3.2.el6.x86_64.rpm                                        | 118 kB     00:01

(...)

Installed:
  repmgr96.x86_64 0:3.3.2.el6

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: 

  • 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'
  • 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:

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

Tieniti in contatto con noi.

Iscriviti alla nostra newsletter trimestrale: riceverai le ultime notizie su 2ndQuadrant e aggiornamenti sulle tecnologie da noi supportate

La tua privacy è tutelata in base alla normativa vigente (art. 13 D. Lgs. 30.06.2003, n. 196).