2.1. Building and installing Cluster Glue from source
2.1.1. Cluster Glue build prerequisites
Building Cluster Glue requires the presence of the following tools and libraries on the build system:
A C compiler (typically gcc) and associated C development libraries;
the flex scanner generator and the bison parser compiler;
net-snmp development headers, to enable SNMP related functionality;
OpenIPMI development headers, to enable IPMI related functionality;
Python (just the language interpreter, not library headers).
Note
This list applies to the default software configuration. If you configure the source with non-standard options, other dependencies may apply.
2.1.2. Downloading Cluster Glue sources
Several options are available for retrieving the Cluster Glue source code, for building locally on a target system.
2.1.2.1. Downloading a release tarball
Downloading a released version of Heartbeat as a compressed tarball is equivalent to fetching a tagged snapshot from the Mercurial source code repository. Release tags follow the format glue-x.y.z, where x.y.z is the released version of Cluster Glue you wish to download.
If, for example, one wants to download the 1.0.1 release, the correct sequence of commands would be:
# wget http://hg.linux-ha.org/glue/archive/glue-1.0.1.tar.bz2
# tar -vxjf glue-1.0.1.tar.bz2
2.1.2.2. Downloading the latest Mercurial snapshot
The latest development code is always available in the Mercurial repository as the tip revision.
To download a tarball auto-generated from the tip, use this sequence of commands:
# wget http://hg.linux-ha.org/glue/archive/tip.tar.bz2
# tar -vxjf tip.tar.bz2
2.1.2.3. Checking out sources from Mercurial
This is the method you would apply if you have the Mercurial utilities locally installed. Checking out the sources amounts to cloning the repository:
$ hg clone http://hg.linux-ha.org/glue cluster-glue
requesting all changes
adding changesets
adding manifests
adding file changes
added 12491 changesets with 34830 changes to 2632 files
updating working directory
356 files updated, 0 files merged, 0 files removed, 0 files unresolved
2.1.3. Building Cluster Glue
Building Cluster Glue is an automated process making extensive use of GNU Autotools. When building and installing on the same machine, it usually amounts to just the following sequence of commands:
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
Note
The autogen.sh script is a convenience wrapper around automake, autoheader, autoconf, and libtool.
A number of configuration options are supported, and you may tweak some of them to optimize Heartbeat for your system. To retrieve a list of configuration options, you may invoke configure with the --help option. A customized build may thus comprise these steps:
$ ./autogen.sh
$ ./configure --help
$ ./configure configuration-options
$ make
$ sudo make install
RPM spec files are provided in the Cluster Glue source tree both for SuSE and Red Hat based distributions:
cluster-glue-suse.spec should be used for OpenSUSE and SLES installations.
cluster-glue-fedora.spec is for Fedora, Red Hat Enterprise Linux, and CentOS.
The Cluster Glue source tree also contains a debian/ subdirectory, which you may use for building a Debian package. Simply invoke dpkg-buildpackage from the top of the source tree.