Install
From Cluster Labs
Contents |
READ ME FIRST
Please do not attempt to install Pacemaker with anything less than Heartbeat 3.0.0
Since Pacemaker was originally part of Heartbeat, it naturally includes many of the files contained in Heartbeat 2.x Most package managers including YUM, RPM and DEB will complain extremely loudly if you try this.
Versions and Compatibilty
The list of current and supported versions of Pacemaker are available at the Releases page. If you already have Pacemaker installed, please read the documentation on upgrading Pacemaker before following any of the instructions here.
| Version | Last Release | First Released |
|---|---|---|
| 0.7 | 0.7.3 | June 25, 2008 |
| NA |
Binary Packages
RPM
Binary packages for current Fedora, OpenSUSE and EPEL compatible distributions (eg. RHEL, CentOS and Scientific Linux) releases can be found at:
http://www.clusterlabs.org/rpm/
Simply browse for your distribution and download the relevant packages.
Once installed, you can decide which cluster stack to use at runtime simply by starting either /etc/init.d/heartbeat or /etc/init.d/corosync. You can also choose not to install whichever stack you don't wish to use.
Installing on Fedora
For Fedora-11, installation is as simple as:
wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/rpm/fedora-11/clusterlabs.repo yum install -y pacemaker corosync heartbeat
As of Fedora-12, Pacemaker is part of the distribution and updates are usually quickly available via the regular channels. There is nothing extra to download, just run:
yum install -y pacemaker corosync heartbeat
Installing on EPEL Compatible Distributions: RHEL, CentOS, etc
The Pacemaker packages in the EPEL directories build against some additional packages that don't exist on vanilla RHEL/CentOS installs. For more information on EPEL, see http://fedoraproject.org/wiki/EPEL/FAQ
So before installing Pacemaker, you will first need to tell the machine how to find the EPEL packages Pacemaker depends on. To do this, download and install the EPEL package that matches your RHEL/CentOS version.
For example to install on RHEL5.3 for i386, you'd run:
su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'
Now add the Cluster Labs repo:
wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/rpm/epel-5/clusterlabs.repo
And finally, install Pacemaker:
yum install -y pacemaker corosync heartbeat
Installing on openSUSE
openSUSE uses zypper instead of yum, but the procedure is much the same:
zypper ar http://clusterlabs.org/rpm/opensuse-11.1/clusterlabs.repo zypper refresh zypper in pacemaker corosync heartbeat
Intra-Stack Package Dependancies
Single Stack Configurations (RPM only)
For those that refuse to install the libraries of whichever stack you wont be using, you can rebuild the published rpms to meet your needs. To do this:
- Download the src.rpm
Browse to http://clusterlabs.org/rpm/
Look for the src directory underneath the one for your distro (eg. fedora-11/src) and download the most recent version of Pacemaker. - Tell RPM to rebuild the package
- rpmbuild --rebuild --without=heartbeat pacemaker-[0-9].*.src.rpm
or - rpmbuild --rebuild --without=ais pacemaker-[0-9].*.src.rpm
- rpmbuild --rebuild --without=heartbeat pacemaker-[0-9].*.src.rpm
- Install the result
rpm -Uvh /usr/src/packages/RPMS/i586/pacemaker-[0-9]*.rpm
Previous Stable Versions
Binary packages of the stable-0.6 release series for older .rpm 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/
Over time, we will phase out this remaining use of the OpenSUSE Build Service. It has proven to be too slow and unreliable for continued use by the Pacemaker project.
Re-Building RPMs for Other Architectures
If your packages are not available for your distro/version, you can rebuild the published rpms to meet your needs. To do this:
- Download the src.rpm
Browse to http://clusterlabs.org/rpm/fedora-11/src/ and download the most recent version of Pacemaker. - Tell RPM to rebuild the package
rpmbuild --rebuild pacemaker-[0-9].*.src.rpm - Install the result
rpm -Uvh /usr/src/packages/RPMS/i586/pacemaker-[0-9]*.rpm
Debian
Martin Loschwitz from LINBIT does the official builds for Pacemaker (and any other required parts of the stack). "Official" in this sense means that the packages are endorsed by Andrew and the Pacemaker maintainers. These builds have not yet been merged into Debian GNU/Linux proper; this is being worked on.
Please note that the repository URLs changed between Pacemaker releases 1.0.4 and 1.0.5. This is due to the fact that the 1.0.5 packages are integrated with Corosync, which the 1.0.4 packages were not -- this required a makeover to the package build layout.
For detailed installation instructions, refer to the Debian Lenny HowTo. If you run into any issues installing, updating, or using these packages, please let us know on the mailing list.
Use your favorite editor to add one of the following to /etc/apt/sources.list
For Debian 5.0 (lenny):
deb http://people.debian.org/~madkiss/ha lenny main
For Debian unstable (sid):
deb http://people.debian.org/~madkiss/ha sid main
Once this has been completed, run:
apt-get update
Finally, to install Pacemaker simply decide which stack you wish to use and run
apt-get install pacemaker corosync
or
apt-get install pacemaker heartbeat
Please note: currently, no direct, "rolling upgrade" path exists for Debian users to move from the woefully outdated Heartbeat 2.1.3 with built-in CRM that continues to be part of the official Debian package repositories. Providing this upgrade path is something that Martin has on his to-do list, but it's a little more challenging than it looks to an observer.
Building from Source
To obtain the latest bug fixes, you may wish to build debian packages from source. To do so:
- Download the Pacemaker source tarball
wget -O pacemaker.tar.gz http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/tip.tar.gz
- Unpack the tarball
tar zxvf pacemaker.tar.gz
- Build the .deb
cd pacemaker-1.0 dpkg-buildpackage -rfakeroot -uc -us
Ubuntu
Ubuntu users can either install the Debian packages, or try the ones from 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
Darwin/MacOS X
Follow the source based installation instructions below after having installed MacPorts and installing the following pre-requisites:
sudo port install pkgconfig glib2 help2man
And make sure the default autoconf installation understands the pkg-config macros:
sudo ln -s /opt/local/share/aclocal/pkg.m4 /usr/share/aclocal/
From Source
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 CLUSTER_USER=hacluster export CLUSTER_GROUP=haclient
Create a user and group for the cluster
getent group ${CLUSTER_GROUP} >/dev/null || groupadd -r ${CLUSTER_GROUP}
getent passwd ${CLUSTER_USER} >/dev/null || useradd -r -g ${CLUSTER_GROUP} -d /var/lib/heartbeat/cores/hacluster -s /sbin/nologin -c "cluster user" ${CLUSTER_USER}
Cluster Glue
Obtain the latest Cluster Glue sources, then create and initialize the build directory
wget -O cluster-glue.tar.bz2 http://hg.linux-ha.org/glue/archive/tip.tar.bz2 tar jxvf cluster-glue.tar.bz2 cd Reusable-Cluster-Components-*
Or, if you want to fetch Cluster Glue directly from the Mercurial repository:
hg clone http://hg.linux-ha.org/glue cd glue
Teach Cluster Glue about the machine it will run on
./autogen.sh && ./configure --prefix=$PREFIX --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP}
Once configure reports success, simply execute
make sudo make install
Resource Agents
Obtain the latest sources:
wget -O resource-agents.tar.bz2 http://hg.linux-ha.org/agents/archive/tip.tar.bz2
Create and initialize the build directory
tar jxvf resource-agents.tar.bz2 cd Cluster-Resource-Agents-*
Teach Agents about the machine it will run on
./autogen.sh && ./configure --prefix=$PREFIX
Once configure reports success, simply execute
make sudo make install
Heartbeat*
* You can skip this step if you prefer to use the OpenAIS/Corosync cluster stack.
Obtain the latest Heartbeat sources:
wget -O heartbeat.tar.bz2 http://hg.linux-ha.org/dev/archive/tip.tar.bz2
Create and initialize the build directory
tar jxvf heartbeat.tar.bz2 cd Linux-HA-Dev-*
Teach Heartbeat about the machine it will run on
./bootstrap && ./configure --prefix=$PREFIX
Once configure reports success, simply execute
make sudo make install
CoroSync*
*You can skip this step if you prefer to use the Heartbeat cluster stack.
CoroSync contains the infrastructure (such as interprocess communication and network protocols) that used to be part of OpenAIS. See the CoroSync FAQ entry for more details.
For the majority of Pacemaker users, it is simplest to think of CoroSync as simply a new version of OpenAIS without a bunch of stuff you weren't using anyway.
Grab the latest code from the CoroSync project which has all the required patches to support Pacemaker
svn co http://svn.fedorahosted.org/svn/corosync/branches/flatiron/ cd flatiron
Teach CoroSync about the machine it will run on
./autogen.sh && ./configure --prefix=$PREFIX --with-lcrso-dir=$LCRSODIR
Once configure reports success, simply execute
make sudo make install
OpenAIS*
*You can skip this step if you prefer to use the Heartbeat cluster stack or don't plan on using GFS2 or OCFS2.
Although Pacemaker doesn't require the full OpenAIS stack (just CoroSync is sufficient), some cluster services do. These include:
* OCFS2 * GFS2 * cLVM
In order to use any of the above services in a Pacemaker cluster, you'll need to install OpenAIS.
Grab the latest code from the OpenAIS project
svn co http://svn.fedorahosted.org/svn/openais/branches/wilson cd wilson
Teach OpenAIS about the machine it will run on ./autogen.sh && ./configure --prefix=$PREFIX --with-lcrso-dir=$LCRSODIR
Once configure reports success, simply execute
make sudo make install
Pacemaker
Obtain the latest Pacemaker sources:
wget -O pacemaker.tar.bz2 http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/tip.tar.bz2
You can obtain a specific release by substituting tip with Pacemaker-{version}. eg.
wget -O pacemaker.tar.bz2 http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/Pacemaker-1.0.5.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 cd stable-1.0 hg update tip
Create and initialize the build directory
tar jxvf pacemaker.tar.bz2 cd Pacemaker-1-0-*
Teach Pacemaker about the machine it will run on
./autogen.sh && ./configure --prefix=$PREFIX --with-lcrso-dir=$LCRSODIR
Once configure reports success, simply execute
make sudo make install
for some reason this also appears to be necessary
sudo ldconfig -v
be sure to first update LD_LIBRARY_PATH if you installed Pacemaker (or anything else) into a non-standard location.
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
Next Steps
Once Pacemaker is installed, the next step is to configure your cluster stack: Initial Configuration.

