This page describes how to install and compile the HeartbeatProgram on MacOS X (Panther) - feedback via the mailing lists or this wiki page are welcome.
This is a work in progress and feedback is welcome. You can email me at andrew at beekhof dot net.
Update (07-05-2004): The basic HeartbeatProgram will run on MacOS X (Panther) and play nicely with HeartbeatProgram(s) running on other OSes... horah! However (boo!) there appears to be some issues that prevent clients (such as the CCM and parts of the NewHeartbeatDesign) from connecting to it. Essentially, this relates to sockets and security. Unfortunately, while Apple provides a man-page for getpeereid(), they neglected to also provide an implementation... not happy Jan! I will be investigating alternatives in the comming days and if necessary, weeks.
Update (27 June 2004): A solution has been found and is awaiting final approval before commiting to CVS HEAD.
Update (28 June 2004): Now that I know it wont be a waste of time, a Cocoa GUI is in development".
Update (04 October 2004): The authentication/autorization issues mentioned above have been addressed and will be checked into CVS once the patch has been reviewed.
Update (14 November 2004): The authentication/autorization patch has been checked in. I'd really like to replace it with getpeereid() though. Added some post install instructions.
Version numbers in []'s indicate the versions I used when writing this document, your milage may vary.
Buy a mac and install panther
glib2-dev [2.2.3-2]
gettext-dev [0.10.40-17]
There have been reports that a manual install (Ie. from source) is required for gettext... I havent found this necessary.
If you wish to compile anything using UUIDs (Ie. the NewHeartbeatDesign)
./configure --prefix=/sw
make
sudo make install
Patch your version of Darwin so that getpeereid() is available. Paul Day has a nice page on compiling the kernel. Hopefully one day we wont need to...
Download from http://www.opensource.apple.com/darwinsource
make
sudo make install
Download from http://www.opensource.apple.com/darwinsource
make
sudo make install
Download from http://www.opensource.apple.com/darwinsource
in Makefile, set COMMON_SUBDIRS = libstuff libmacho misc ld. We dont need the rest.
in ld/rld.c add #include <mach-o/kld.h>
make
sudo cp misc/seg_hack.NEW /usr/local/bin/seg_hack
sudo cp ld/static_kld/libkld.a /usr/local/lib
sudo ranlib /usr/local/lib/libkld.a
Download from http://www.opensource.apple.com/darwinsource
Follow Paul Day's guide here
Download from http://www.opensource.apple.com/darwinsource
Apply this patch (made against 517.9.4) getpeereid.diff.txt
. SETUP/setup.sh
make all
Follow Paul Day's guide here to install next to your vanilla kernel.
gcc test.c
./a.out
http://www.linux-ha.org
export CVSROOT=:pserver:guest@cvs.linux-ha.org:/home/cvs/linux-ha
cvs login
the password is also "guest" (without the quotes)
cvs co linux-ha
./ConfigureMe bootstrap [--enable-crm], The --enable-crm is optional
Be sure to run ./ConfigureMe not ./configure as it sets a number of defaults especially for OSX.
make
You may get an error like that below when you first run make. If so, just run make again and it should work
configure.ac:53: version mismatch. This is Automake 1.7.6, configure.ac:53: but the definition used by this AM_INIT_AUTOMAKE configure.ac:53: comes from Automake 1.7.3. You should recreate configure.ac:53: aclocal.m4 with aclocal and run automake again.
sudo make install
a user called hacluster with uid = 65, primary gid = 65 and home = /sw/lib/heratbeat
a group called haclient with gid = 65
I Recommend placing root and hacluster in this group
Now is a good time to run /sw/lib/heartbeat/BasicSanityCheck
Note: You should update TESTIP before running the test
Send feedback on this process and the end result to linux-ha-dev@lists.linux-ha.org