Installing Failover Manager v4

For information about the platforms and versions supported by Failover Manager, see Platform Compatibility.

Note

A mixed mode for CPU architecture is supported where the Primary and Standby nodes are on Linux on IBM Power and Witness node is on x86-64 Linux.

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

https://info.enterprisedb.com/rs/069-ALB-339/images/Repository%20Access%2004-09-2019.pdf

RedHat or CentOS Host

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.

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
  2. Install the EDB repository:

    yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
  3. 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
  4. Install the EPEL repository:

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  5. 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"
  6. Install the selected package:

    yum -y install edb-efm42

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/edbrepos/edb-repo-latest.noarch.rpm
  2. 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
  3. Install the EPEL repository:

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  4. 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"
  5. Install the selected package:

    yum -y install edb-efm42

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
  2. 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
  3. 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 the additional repositories to resolve 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
  2. Install the selected package:

    dnf -y install edb-efm42

Debian or Ubuntu Host

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.

Debian Host

  1. Assume superuser privileges:
    sudo su – 
  2. 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
  2. Add the EDB signing key:
    wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add -
  3. Update the repository meta data:
    apt-get update
  4. Install Failover Manager:
    apt-get -y install edb-efm42

Ubuntu Host

  1. Assume superuser privileges:
    sudo su –
  2. 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.4

    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
  2. Add the EDB signing key:
    wget -q -O - https://<username>:<password>@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add -
  3. Update the repository meta data:
    apt-get update
  4. Install Failover Manager:
    apt-get -y install edb-efm42

SLES Host

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/repository-access-request

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
  4. 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
  5. 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-efm42

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 on each node of the cluster, you must:

  1. Modify the cluster properties file on each node.
  2. Modify 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 agent on each node of the cluster. For more information, see controlling the failover manager service.

Installation Locations

components are installed in the following locations:

ComponentLocation
Executables/usr/edb/efm-4.2/bin
Libraries/usr/edb/efm-4.2/lib
Cluster configuration files/etc/edb/efm-4.2
Logs/var/log/efm- 4.2
Lock files/var/lock/efm-4.2
Log rotation file/etc/logrotate.d/efm-4.2
sudo configuration file/etc/sudoers.d/efm-42
Binary to access VIP without sudo/usr/edb/efm-4.2/bin/secure