Page MenuHomeClusterLabs Projects

How To Install
Updated 69 Days AgoPublic

Versions and compatibility

The release calendar lists actively developed versions of Pacemaker. If you already have Pacemaker installed, please see "Upgrading a Pacemaker Cluster" in the Pacemaker Administration document before proceeding.


Install from binary packages

Most Linux distributions do a good job of providing up-to-date binary packages for ClusterLabs components. In general you can just search for "pacemaker" and "corosync" and install the relevant packages. Also look for pcs or crm shell if you want a higher-level administration interface.

Our quickstart guides have more detailed instructions for particular distribution versions, but unfortunately they're rather out of date at this point. Below are commands for commonly used distributions.

Fedora

dnf install -y  corosync pacemaker pcs

RHEL and compatible distros (AlmaLinux, CentOS, Scientific Linux, etc.)

yum install -y corosync pacemaker pcs

Pacemaker has been available for Red Hat Enterprise Linux (RHEL) since version 6.0 as part of the High Availability Add-On. Users who purchase the add-on get the full value of a Red Hat subscription, including support, certifications, training, RHEL-specific documentation, and so on.

Users who are willing to forego that level of support can install from RHEL install media, RHEL SRPMs, or a compatible distro.

openSUSE

zypper install corosync pacemaker

Debian and compatible distros (Ubuntu, etc.)

apt-get install corosync pacemaker

or

aptitude install corosync pacemaker

See the Debian-HA wiki for more information.


Install from source

If packages are unavailable for your platform, or you just want to build the cluster software yourself, source code is available.

Create user and group

Create a user account and group account to run Pacemaker daemons as. The group account may also be used to give regular users the ability to modify the Pacemaker configuration via access control lists (ACLs).

Here, we will refer to these as $DAEMON_USER and $DAEMON_GROUP. The defaults are hacluster and haclient. If you want something different, you will need to pass the --with-daemon-user and --with-daemon-group options to Pacemaker's configure script.

The exact commands vary by platform, but to use a common example:

getent group $DAEMON_GROUP >/dev/null || groupadd -r $DAEMON_GROUP
getent passwd $DAEMON_USER >/dev/null || useradd -r -g $DAEMON_GROUP -s /sbin/nologin -c "Cluster daemon user" $DAEMON_USER

Install dependencies

You will need a typical development environment with a C compiler (gcc and clang are regularly tested) and git.

Use your platform's native installer to find and install the dependencies listed in Pacemaker's INSTALL document (aside from LibQB and Corosync, which will be described below). Of course, you could install these from source if you prefer.

NOTE: MacOS is not a supported build platform, but if you want to try, installing MacPorts will likely be helpful to find dependencies. At least in the past, to help the default autoconf installation understand the pkg-config macros required sudo ln -s /opt/local/share/aclocal/pkg.m4 /usr/share/aclocal/.

Install base ClusterLabs software

Follow the instructions below for each of the projects listed below, in order:

ProjectSource repository
LibQBgit://github.com/ClusterLabs/libqb.git
Kronosnet (knet)git://github.com/kronosnet/kronosnet.git
Corosyncgit://github.com/corosync/corosync.git
Pacemakergit://github.com/ClusterLabs/pacemaker.git
  • Change to wherever you want to put the source (such as /usr/local/src)
  • Download the source by running the following, replacing $SOURCE_REPOSITORY with the appropriate URL from the above table: git clone $SOURCE_REPOSITORY
  • Change to the directory where you just cloned the source
  • Prepare the build environment by running ./autogen.sh
    • If there are problems, you may not have all the autotools components properly installed.
  • If you want to see the default installation locations or the options to change them, run ./configure --help.
  • Do build-time configuration, adding options as desired, by running ./configure
  • Build by running make
  • Install by running sudo make install

Install additional software

You will almost certainly need to install the resource-agents and fence-agents projects to have a usable cluster. You will likely want a higher-level administration interface such as crm shell or pcs as well.

See the full list of projects at ClusterLabs on GitHub and follow the instructions provided with desired ones.

Set up a cluster

Once Pacemaker is installed, the next step is to configure your cluster stack. See the Pacemaker documentation set.

Last Author
kgaillot
Last Edited
Jan 9 2024, 12:50 PM