Linux Heartbeat “Provide a high availability (clustering) solution for Linux which promotes reliability, availability, and serviceability (RAS) through a community development effort.”
As the linux-heartbeat is not yet shipped with Red Hat Enterprise Linux, one can use rpm’s from the clone operating system of RHEL i.e. Centos a 100% binary compaitable with redhat. The rpm from centos extras repository is not yet updated, I found difficulties getting heartbeat installation, tried the heartbeat-2.1*.el5.centos.src.rpm but same error, though the second attempt of rpm installation was not showing any error and installation succeeds, but for a production enviornment or self satisfaction with the work it is not acceptable. The error is like:
rpm -ivh /usr/src/redhat/RPMS/i386/heartbeat-2.1.3-1.i386.rpm
useradd: user hacluster exists
error: %pre(heartbeat-2.1.3-1.i386) scriptlet failed, exit status 9
error: install: %pre scriptlet failed (2), skipping heartbeat-2.1.3-1
Next attempt I tried with open suse linux rpm’s in which I had a different error due to minor bug in heartbeat.spec file, thanks to ‘bleve’ for helping me out and ‘lmb’ who updated the heartbeat.spec for Open Suse, now rpm’s from open suse site are working and updated, avialable on http://download.opensuse.org/repositories/server:/ha-clustering:/lha-2.1/RHEL_5/
Lately I found a 3rd method to build from source which is as follows,
Make sure you have following packges are installed or you will get errors.
libgpg-error-devel
libgcrypt-devel
libtool-ltdl
imake
autoconf
automake
libtool
OpenIPMI-devel
gdbm-devel
bison
flex
bzip2-devel
libtool-ltdl-devel
gnutls-devel
python-devel
swig
pam-devel
beecrypt-devel
sqlite-devel
lm_sensors
net-snmp
libsepol-devel
libselinux-devel
ncurses-devel
elfutils-libelf-devel
elfutils-libelf-devel-static
rpm-devel
elfutils-devel
net-snmp-devel
elfutils-devel-static
e2fsprogs-devel
gnu-crypto
cryptsetup-luks-devel
gnu-crypto-sasl-jdk1
beecrypt-python
gnu-crypto-javadoc
krb5-devel
openssl-devel
Download latest heartbeat source:
- wget http://hg.linux-ha.org/lha-2.1/archive/STABLE-2.1.4.tar.bz2
- uncompress the source, tar jxvf STABLE-2.1.4.tar.bz2
- cd Heartbeat-STABLE-2-1-STABLE-2.1.4
- ./ConfigureMe configure
- make dist
- tar zxvf heartbeat-2.1.4.tar.gz
- cp .. /heartbeat-2.1.4.tar.gz /usr/src/redhat/SOURCES/
- Build rpm packages with ‘rpmbuild -bb heartbeat.spec’
- Step 9 will create rpm’s for you according to your machine architecture, f.e /usr/src/redhat/RPMS/i386
Install the rpms, i have my rpms under /usr/src/redhat/RPMS/i386.
rpm -ivh /usr/src/redhat/RPMS/i386/pils-2.1.4-1.i386.rpm
rpm -ivh /usr/src/redhat/RPMS/i386/stonith-2.1.4-1.i386.rpm
rpm -ivh /usr/src/redhat/RPMS/i386/heartbeat-2.1.4-1.i386.rpm
Configuration of heartbeat is a different thing, I am using heartbeat for DRBD (Distributed redundent block device), iSCSI (scsi over ip) and vip to create a storage area network, heartbeat has wide possiblities e.g. high availability of mysql, httpd etc, please read their documention.
you can contact me on anujhere@gmail.com
Anuj Singh.
A few more dependencies here…
libnet
glib2-devel
- Thanks for the tips
yes Martin,
Download dependency libnet rpm for heartbeat from http://mirrors.nl.kernel.org/centos/5.2/extras/SRPMS/libnet-1.1.2.1-2.rf.src.rpm
Build rpm from downloaded source rpm.
rpmbuild –rebuild libnet-1.1.2.1-2.rf.src.rpm
Install libnet rpm from step above which is created under /usr/src/redhat/RPMS/i386/ directory, depending on your machine arch.
rpm -ivh /usr/src/redhat/RPMS/i386/libnet-1.1.2.1-2.rf.i386.rpm
and glib2-devel is shipped with the RHEL5.1.