Installing Failover Manager

To request credentials that allow you to access an EnterpriseDB repository, visit the EDB website at:

When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter y, and press Return to continue.

During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve.

Failover Manager must be installed by root. During the installation process, the installer will also create a user named efm that has sufficient privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

After receiving your credentials, you must create the EnterpriseDB repository configuration file on each node of the cluster, and then modify the file to enable access. The following steps provide detailed information about accessing the EnterpriseDB repository; the steps must be performed on each node of the cluster:

Installing on a RHEL or CentOS 7 PPCLE HOST

  1. Use the following command to create a configuration file and install Advance Toolchain:

rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b

cat > /etc/yum.repos.d/advance-toolchain.repo <<EOF
# Begin of configuration file
[advance-toolchain]
name=Advance Toolchain IBM FTP
baseurl=https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=ftp://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHELX/gpg-pubkey-6976a827-5164221b
# End of configuration file
EOF
  1. Install the EDB repository:

yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  1. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories:

sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  1. Install the EPEL repository:

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  1. On RHEL 7 PPCLE, enable the additional repositories to resolve EPEL dependencies:

subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"
  1. Install the selected package:

yum -y install edb-efm40

Installing on a RHEL or CentOS 7 HOST

  1. To create the repository configuration file, assume superuser privileges, and invoke the following command:

yum -y install https://yum.enterprisedb.com/edb-repo-rpms/edb-repo-latest.noarch.rpm
  1. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories:

sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  1. Install the EPEL repository:

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  1. On RHEL 7, enable the additional repositories to resolve dependencies:

subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"
  1. Install the selected packages:

yum -y install edb-efm40

Installing on a RHEL or CentOS 8 HOST

  1. To create the repository configuration file, assume superuser privileges, and invoke the following command:

dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  1. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories:

sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
  1. Install the EPEL repository:

On CentOS 8

dnf -y install epel-release

On RHEL 8

dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  1. Enable additional repositories to resolve EPEL dependencies:

On CentOS 8:

dnf config-manager --set-enabled PowerTools

On RHEL 8:

ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
  1. Disable the built-in PostgreSQL module:

dnf -qy module disable postgresql
  1. Install the selected packages:

dnf -y install edb-efm40

To install Failover Manager, you must have credentials that allow access to the EnterpriseDB repository. To request credentials for the repository, visit the EnterpriseDB website at:

https://www.enterprisedb.com/user/login

The following steps will walk you through using the EnterpriseDB apt repository to install Failover Manager.

  1. Assume superuser privileges:

sudo su –
  1. Configure the EnterpriseDB repository by substituting your EnterpriseDB credentials for the username and password placeholders in the following commands:

On Debian 9

sh -c 'echo "deb https://username:password@apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

On Debian 10

sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

sh -c 'echo "machine apt.enterprisedb.com login <username> password <password>" > /etc/apt/auth.conf.d/edb.conf'
  1. Add support to your system for secure APT repositories:

apt-get install apt-transport-https
  1. Add the EDB signing key:

wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add -
  1. Update the repository meta data:

apt-get update
  1. Install Failover Manager:

apt-get -y install edb-efm40
  1. Assume superuser privileges:

sudo su –
  1. Configure the EnterpriseDB repository by substituting your EnterpriseDB credentials for the username and password placeholders in the following commands:

On Ubuntu 18.04

sh -c 'echo "deb https://username:password@apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

On Ubuntu 20.04

sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list'

sh -c 'echo "machine apt.enterprisedb.com login <username> password <password>" > /etc/apt/auth.conf.d/edb.conf'
  1. Add support to your system for secure APT repositories:

apt-get install apt-transport-https
  1. Add the EDB signing key:

wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add -
  1. Update the repository meta data:

apt-get update
  1. Install Failover Manager:

apt-get -y install edb-efm40

To install Failover Manager, you must have credentials that allow access to the EnterpriseDB repository. To request credentials for the repository, visit the EnterpriseDB website at:

You can use the zypper package manager to install a Failover Manager agent on an SLES 12 host. zypper will attempt to satisfy package dependencies as it installs a package, but requires access to specific repositories that are not hosted at EnterpriseDB.

1. You must assume superuser privileges and stop any firewalls before installing Failover Manager. Then, use the following commands to add EnterpriseDB repositories to your system:

zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo

2. The commands create the repository configuration files in the /etc/zypp/repos.d directory. Then, use the following command to refresh the metadata on your SLES host to include the EnterpriseDB repository:

zypper refresh

When prompted, provide credentials for the repository, and specify a to always trust the provided key, and update the metadata to include the EnterpriseDB repository.

3. You must also add SUSEConnect and the SUSE Package Hub extension to the SLES host, and register the host with SUSE, allowing access to SUSE repositories. Use the commands:

zypper install SUSEConnect
SUSEConnect -r <registration_number> -e <user_id>
SUSEConnect -p PackageHub/12.4/x86_64
SUSEConnect -p sle-sdk/12.4/x86_64
  1. Install SUSEConnect to register the host with SUSE, allowing access to SUSE repositories:

zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP4/Apache:Modules.repo
  1. Install OpenJDK (version 1.8) for Java based components:

zypper -n install java-1_8_0-openjdk

6. Now you can use the zypper utility to install a Failover Manager agent:

zypper -n install edb-efm40

For detailed information about registering a SUSE host, visit:

Performing post-installation tasks

If you are using Failover Manager to monitor a cluster owned by a user other than enterprisedb or postgres, see Extending Failover Manager Permissions .

After installing Failover Manager on each node of the cluster, you must:

  1. Create the cluster properties file on each node.

  2. Create the cluster members file on each node.

  3. If applicable, configure and test virtual IP address settings and any scripts that are identified in the cluster properties file.

  4. Start the Failover Manager agent on each node of the cluster. For more information about controlling the Failover Manager service, see the section Controlling the Failover Manager Service.

Installation Locations

Failover Manager components are installed in the following locations:

Component

Location

Executables

/usr/edb/efm-4.0/bin

Libraries

/usr/edb/efm-4.0/lib

Cluster configuration files

/etc/edb/efm-4.0

Logs

/var/log/efm-4.0

Lock files

/var/lock/efm-4.0

Log rotation file

/etc/logrotate.d/efm-4.0

sudo configuration file

/etc/sudoers.d/efm-40

Binary to access VIP without sudo

/usr/edb/efm-4.0/bin/secure