Phriction Welcome to the ClusterLabs Wiki Cluster Administration How To Install History Version 1 vs 2
Version 1 vs 2
Version 1 vs 2
Content Changes
Content Changes
== Versions and Compatibilty ==
The [[https://projects.clusterlabs.org/w/projects/pacemaker/pacemaker_release_calendar/|release calendar]] lists actively developed versions of Pacemaker. If you already have Pacemaker installed, please see [[https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/html/upgrading.html|"Upgrading a Pacemaker Cluster"]] in the //Pacemaker Administration// document before proceeding.
== Binary Packages ==
Most Linux distributions do a good job of providing up-to-date binary packages for ClusterLabs components, including:
* [[https://archlinux.org/Arch|Arch Linux]]
* [[http://www.centos.org/|CentOS]]
* [[http://fedoraproject.org/|Fedora]]
* [[https://www.gentoo.org/|Gentoo]]
* [[http://opensuse.org/|OpenSUSE]]
* [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux|RHEL]]
* [[http://scientificlinux.org/|Scientific Linux]]
* [[https://www.suse.com/products/server/|SUSE Linux Enterprise Server]]
* [[https://ubuntu.com/|Ubuntu]]
See [[http://clusterlabs.org/quickstart.html|quickstart guides]] for more information about installing on particular distributions.
=== RPM-based distributions ===
==== Fedora ====
Pacemaker has been a part of the standard Fedora repositories since Fedora 12. To install:
```
yum install -y pacemaker corosync
```
==== RHEL and compatible distros (AlmaLinux, CentOS, Scientific Linux, etc.) ====
Pacemaker has been available for [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux | Red Hat Enterprise Linux (RHEL)]] since version 6.0 as part of the [[https://www.redhat.com/en/resources/high-availability-add-datasheet | 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.
To install:
```
yum install -y pacemaker corosync pcs
```
==== openSUSE ====
To install:
```
zypper install pacemaker corosync
```
=== .deb-based distributions ===
==== Debian ====
See [[https://wiki.debian.org/Debian-HA/|the Debian-HA wiki]] for the latest information.
Pacemaker and related components have been available from the standard Debian repositories for a long time, but were removed from Debian 8 ("jessie") due to packaging issues that were not resolved before release. For jessie, Pacemaker is available from [[http://backports.debian.org|Debian backports]].
To install:
```
apt-get install pacemaker corosync
```
==== Ubuntu ====
As of Ubuntu 10.4 (Lucid Lynx), Pacemaker and all its dependancies are part of the distribution. Simply run:
```aptitude install corosync pacemaker```
or
```aptitude install heartbeat pacemaker```
Users of Ubuntu versions prior to 10.4 can either install the Debian packages, or try the ones from [[https://launchpad.net/~ubuntu-ha/+archive/ppa|LaunchPad]] by adding
```
deb http://ppa.launchpad.net/ubuntu-ha/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/ubuntu-ha/ppa/ubuntu karmic main
```
to ///etc/apt/sources.list// before running the same aptitude command above.
=== Other ===
If no packages are available, you might need to [[SourceInstall|install from source]].
== Next Steps ==
Once Pacemaker is installed, the next step is to configure your cluster stack. Check out our [[http://clusterlabs.org/quickstart.html|quickstart guides]].
== Versions and compatibility ==
The [[https://projects.clusterlabs.org/w/projects/pacemaker/pacemaker_release_calendar/|release calendar]] lists actively developed versions of Pacemaker. If you already have Pacemaker installed, please see [[https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/html/upgrading.html|"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 [[http://clusterlabs.org/quickstart.html|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 [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux | Red Hat Enterprise Linux (RHEL)]] since version 6.0 as part of the [[https://www.redhat.com/en/resources/high-availability-add-datasheet | 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 [[https://wiki.debian.org/Debian-HA/|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 [[https://github.com/ClusterLabs/pacemaker/blob/main/INSTALL.md | 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 [[http://www.macports.org/|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:
| Project | Source repository |
| -- | -- |
| [[LibQB]] | git://github.com/ClusterLabs/libqb.git |
| Kronosnet (knet) | git://github.com/kronosnet/kronosnet.git |
| Corosync | git://github.com/corosync/corosync.git |
| Pacemaker | git://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 [[https://github.com/ClusterLabs | 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 [[https://clusterlabs.org/pacemaker/doc/ | Pacemaker documentation set]].
== Versions and Ccompatibility ==
The [[https://projects.clusterlabs.org/w/projects/pacemaker/pacemaker_release_calendar/|release calendar]] lists actively developed versions of Pacemaker. If you already have Pacemaker installed, please see [[https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/html/upgrading.html|"Upgrading a Pacemaker Cluster"]] in the //Pacemaker Administration// document before proceeding.
== Binary Packages ==---
Most Linux distributions do a good job of providing up-to-date== Install from binary packages for ClusterLabs components, including:es ==
* [[https://archlinux.org/Arch|Arch Linux]]
* [[http://www.centos.org/|CentOS]]
* [[http://fedoraproject.org/|Fedora]]
* [[https://www.gentoo.org/|Gentoo]]
* [[http://opensuse.org/|OpenSUSE]]
* [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux|RHEL]]
* [[http://scientificlinux.org/|Scientific Linux]]
* [[https://www.suse.com/products/server/|SUSE Linux Enterprise Server]]
* [[https://ubuntu.com/|Ubuntu]]
See [[http://clusterlabs.org/quickstart.html|quickstart guides]] for more information about installing on particular distributionsMost 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.
=== RPM-based distributions ===Our [[http://clusterlabs.org/quickstart.html|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 ====
Pacemaker has been a part of the standard Fedora repositories since Fedora 12. To install:===
```
yumdnf install -yy corosync pacemaker corosyncpcs
```
==== RHEL and compatible distros (AlmaLinux, CentOS, Scientific Linux, etc.) ====
Pacemaker has been available for [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux | Red Hat Enterprise Linux (RHEL)]] since version 6.0 as part of the [[https://www.redhat.com/en/resources/high-availability-add-datasheet | 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.
To install:
```
yum install -y pacemaker corosynccorosync pacemaker pcs
```
==== openSUSE =Pacemaker has been available for [[https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux | Red Hat Enterprise Linux (RHEL)]] since version 6.0 as part of the [[https://www.redhat.com/en/resources/high-availability-add-datasheet | 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 ===
To install:
```
zypper install pacemaker corosynccorosync pacemaker
```
=== .deb-basedDebian and compatible distributions ===os (Ubuntu, etc.) ===
```apt-get install corosync pacemaker```
==== Debian ====or
```aptitude install corosync pacemaker```
See [[https://wiki.debian.org/Debian-HA/|the Debian-HA wiki]] for the latestmore information.
---
Pacemaker and related components have been available from the standard Debian repositories for a long time, but were removed from Debian 8 ("jessie") due to packaging issues that were not resolved before release. For jessie, Pacemaker is available from [[http://backports.debian.org|Debian backports]].== Install from source ==
To install:
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:
```
apt-get install pacemaker corosyncgetent 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
```
==== Ubuntu ======= Install dependencies ===
As of Ubuntu 10.4 (Lucid Lynx),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 [[https://github.com/ClusterLabs/pacemaker/blob/main/INSTALL.md | INSTALL]] document (aside from LibQB and Corosync, which will be described below). Pacemaker and all its dependancies are part of the distribution.Of course, Simply run:you could install these from source if you prefer.
```aptitude install corosync pacemaker```NOTE: MacOS is not a supported build platform, but if you want to try, installing [[http://www.macports.org/|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/`.
or=== Install base ClusterLabs software ===
```aptitude install heartbeat pacemaker```Follow the instructions below for each of the projects listed below, in order:
Users of Ubuntu versions prior to 10.4 can either install the Debian packages, or try the ones from [[https://launchpad.net/~ubuntu-ha/+archive/ppa|LaunchPad]] by adding
```| Project | Source repository |
deb http://ppa.launchpad.net/ubuntu-ha/ppa/ubuntu karmic main| -- | -- |
deb-src http://ppa.launchpad.net/ubuntu-ha/ppa/ubuntu karmic main| [[LibQB]] | git://github.com/ClusterLabs/libqb.git |
``| Kronosnet (knet) | git://github.com/kronosnet/kronosnet.git |
| Corosync | git://github.com/corosync/corosync.git |
| Pacemaker | git://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`
to ///etc/apt/sources.list// before running the same aptitude command above.== Install additional software ==
=== Other ===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.
If no packages are available, you might need to [[SourceInstall|install from source]]See the full list of projects at [[https://github.com/ClusterLabs | ClusterLabs on GitHub]] and follow the instructions provided with desired ones.
== Next Steps ==== Set up a cluster ==
Once Pacemaker is installed, the next step is to configure your cluster stack. Check out our See the [[https://clusterlabs.org/quickstart.html|quickstart guidespacemaker/doc/ | Pacemaker documentation set]].