Install

READ ME FIRST
It seems the thing to do these days is attempt to install Pacemaker with Heartbeat 2.1.4

PLEASE DO NOT ATTEMPT THIS

Since Pacemaker was originally part of Heartbeat, it naturally includes many of the files contained in Heartbeat 2.1.x Most package managers including YUM, RPM and DEB will complain extremely loudly if you try this.

For versions of Pacemaker prior to 0.6.6, it was possible to build Heartbeat with --disable-crm and this would make the package managers happy. This is what happened for the 2.1.3 packages from the OpenSUSE Build Service.

The problem now is that Pacemaker also includes the STONITH daemon from Heartbeat 2.1 and there is no clean way to disable it.

So please use Heartbeat 2.99.0 or higher.
 * Do it because its the same code as 2.1.4 but without the CRM and STONITH daemon.
 * Do it because it keeps the package managers happy.
 * Do it because thats what 0.6.6 was tested with.
 * Or just do it because the CRM in 2.1.4 is not and will never be supported except for paying SLES10 customers.

Current Versions
The list of current and supported versions of Pacemaker are available at the Releases page.

Binary Packages
Binary packages for most .rpm and .deb based distributions can be found at  http://download.opensuse.org/repositories/server:/ha-clustering/

Simply browse for your distribution and download the relevant packages.

{| cellpadding=1

Package List
! Package !! align=center|Description !! align=left|Pre-requisites
 * libpacemaker3 || Versioned Pacemaker shared libraries || libheartbeat2, libopenais2
 * libopenais2 || Versioned OpenAIS shared libraries || None
 * libheartbeat2 || Versioned Heartbeat shared libraries || None
 * openais || The OpenAIS cluster stack with minor (approved) enhancements to support Pacemaker || libopenais2
 * heartbeat || The Heartbeat cluster stack without the built-in CRM || heartbeat-common, heartbeat-resources
 * heartbeat-common || Common cluster components provided by the Heartbeat project || libheartbeat2
 * heartbeat-resources || OCF Resources for use with Pacemaker || None
 * pacemaker || Pacemaker package supporting both cluster stacks. The choice is made at runtime  || heartbeat, openais
 * }
 * heartbeat || The Heartbeat cluster stack without the built-in CRM || heartbeat-common, heartbeat-resources
 * heartbeat-common || Common cluster components provided by the Heartbeat project || libheartbeat2
 * heartbeat-resources || OCF Resources for use with Pacemaker || None
 * pacemaker || Pacemaker package supporting both cluster stacks. The choice is made at runtime  || heartbeat, openais
 * }
 * pacemaker || Pacemaker package supporting both cluster stacks. The choice is made at runtime  || heartbeat, openais
 * }
 * }

With the above packages installed, you can decide which cluster stack to use at runtime simply by starting either /etc/init.d/heartbeat or '/etc/init.d/openais'

Single Stack Configurations (RPM only)
Binary packages supporting only the OpenAIS cluster stack for most .rpm based distributions can be found at  http://download.opensuse.org/repositories/server:/ha-clustering:/AISONLY/

Note that this repository only contains Pacemaker and anything that depends on it. You will still need to obtain openais (and the common Heartbeat packages) from http://download.opensuse.org/repositories/server:/ha-clustering/

We are still examining ways to make the installation process for this scenario easier.

Why Do I Need to Install Parts of Heartbeat for an OpenAIS based cluster?
Although Pacemaker runs natively on top of OpenAIS, we still use some non-cluster aware daemons (such as the lrmd) and libraries (eg. clplumbing which handles inter-process-communication aka. IPC). Additionally Heartbeat contains a large number of OCF resources that are useful regardless of which stack is being used.

Previous Stable Versions
Binary packages of the stable-0.6 release series for most .rpm and .deb based distributions can be found at  http://download.opensuse.org/repositories/server:/ha-clustering:/PREVIOUS/

Note that this repository only contains Pacemaker and anything that depends on it. You will still need to obtain OpenAIS and Heartbeat from http://download.opensuse.org/repositories/server:/ha-clustering/

We are still examining ways to make the installation process for this scenario easier.

Re-Building RPMs for Other Architectures
rpmbuild --rebuild pacemaker-[0-9].*.src.rpm rpm -Uvh /usr/src/packages/RPMS/i586/pacemaker-[0-9]*.rpm
 * Download the src.rpm
 * Browse to http://download.opensuse.org/repositories/server:/ha-clustering/SUSE_Factory/src/ and select the most recent version.
 * Tell RPM to rebuild the package
 * Install the result

Debian Builds
wget -O pacemaker.tar.gz http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/tip.tar.gz tar zxvf pacemaker.tar.gz  cd pacemaker-1.0 dpkg-buildpackage -rfakeroot -uc -us
 * Download the Pacemaker source tarball
 * Unpack the tarball
 * Build the .deb

Heartbeat
Even if you plan to use the OpenAIS cluster stack, you'll still need some parts of the Heartbeat project. The source for the latest Heartbeat can be found at: http://hg.linux-ha.org/dev/archive/tip.tar.bz2

OpenAIS
NOTE: You can skip this step if you prefer to use the Heartbeat cluster stack.

Until the OpenAIS project puts out the next release (which should include the two required patches), the easiest way to get the right sources is to download a tarball from http://hg.clusterlabs.org/extra/openais/whitetank/archive/tip.tar.bz2

Pacemaker
The latest source can be found at: http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/tip.tar.bz2

Or you can obtain a specific release by substituting tip with pacemaker-{version}. eg. http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/Pacemaker-0.6.3.tar.bz2

Alternatively, for people that want to update regularly, clone the underlying Mercurial repository: hg clone http://hg.clusterlabs.org/pacemaker/stable-1.0

GUI
Although I personally dislike the current GUI, it does appear to be getting better and many people seem to get value from it.

Similar to Pacemaker, you can get the latest sources from: http://hg.clusterlabs.org/pacemaker/pygui/archive/tip.tar.bz2

First Steps
Setup a number of variables that we'll use throughout the build process. Adjust them to your needs. export PREFIX=/usr export LCRSODIR=$PREFIX/libexec/lcrso export STACKS_SUPPORTED="--with-ais-support --without-heartbeat-support"

Heartbeat
Teach Heartbeat about the machine it will run on  ./ConfigureMe bootstrap --prefix=$PREFIX Once configure reports success, simply execute make sudo make install

OpenAIS
There is no configure process for OpenAIS, just build and install make PREFIX=$PREFIX LCRSODIR=$LCRSODIR sudo make install PREFIX=$PREFIX LCRSODIR=$LCRSODIR STATICLIBS=NO

Pacemaker
First configure Pacemaker ./ConfigureMe bootstrap --prefix=$PREFIX --with-lcrso-dir=$LCRSODIR $STACKS_SUPPORTED Once configure reports success, simply execute make sudo make install

Next Steps
Once Pacemaker is installed, the next step is to configure your cluster stack: Initial Configuration.