Installing Failover Manager¶
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, see the EDB Repository Access instructions.
RedHat or CentOS host¶
When you install an RPM package that is signed by a source that isn’t
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 might encounter a dependency that it can’t resolve. If it does, it provides a list of the required dependencies to manually resolve.
Failover Manager must be installed by root. During the installation process, the installer also creates a user named efm that has 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.
RHEL or CentOS 7 PPCLE host¶
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
Install the EDB repository:
* * yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
Replace ‘USERNAME:PASSWORD’ with your username and password for the EDB repositories:
* * * sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
Install the EPEL repository:
* * yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
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"
Install the selected package:
* * yum -y install edb-efm42
RHEL or CentOS 7 host¶
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
Replace ‘USERNAME:PASSWORD’ with your username and password for the EDB repositories:
* * * sed -i "s@<username>:<password>@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo
Install the EPEL repository:
* * yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
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"
Install the selected package:
* * yum -y install edb-efm42
RHEL or CentOS 8 host¶
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
Install the EPEL repository:
Enable the additional repositories to resolve dependencies:
* ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
Disable the built-in PostgreSQL module:
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, see the EnterpriseDB website.
Use the EnterpriseDB APT repository to install Failover Manager.
Debian host¶
* * 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'
Ubuntu host¶
* * 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'
SLES Host¶
To install Failover Manager, you must have credentials that allow access to the EnterpriseDB repository. To request credentials for the repository, see the instructions to access EDB software repositories.
You can use the zypper package manager to install a Failover Manager
agent on an SLES 12 host. zypper attempts to satisfy package
dependencies as it installs a package but requires access to specific
repositories that are not hosted at EnterpriseDB.
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
The commands create the repository configuration files in the
/etc/zypp/repos.ddirectory. 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, specify to always trust the provided key, and update the metadata to include the EnterpriseDB repository.
Add SUSEConnect and the SUSE Package Hub extension to the SLES host and register the host with SUSE, allowing access to SUSE repositories:
* 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
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
Install OpenJDK (version 1.8) for Java-based components:
* zypper -n install java-1_8_0-openjdk
Use the
zypperutility 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:
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:
Component |
Location |
|---|---|
Executables |
/usr/edb/efm-<4.4>/bin |
Libraries |
/usr/edb/efm-<4.4>/lib |
Cluster configuration files |
/etc/edb/efm-<4.4> |
Logs |
/var/log/efm-<4.4> |
Lock files |
/var/lock/efm-<4.4> |
Log rotation file |
/etc/logrotate.d/efm-<4.4> |
sudo configuration file |
/etc/sudoers.d/efm-<4.4> |
Binary to access VIP without sudo |
/usr/edb/efm-<4.4>/bin/secure |