Heartbeat installation and configuration

We will install heartbeat from the EPEL repository:

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm

# vi /etc/yum.repos.d/epel.repo

       enabled=0

# yum –enablerepo=epel install heartbeat

 

Create the following file on both servers with the exact same content:

# vi /etc/ha.d/ha.cf

keepalive 2

deadtime 30

bcast eth0

node c6server1 c6server2

# same thing here for the node names use the same hostname of your hosts… this needs to be whatever uname –n answers.

 

The next setp is to create the resource file for heartbeat on both servers with exact same content again:

# vi /etc/ha.d/haresources

c6server1 IPaddr::10.0.0.100/24/eth0 drbddisk::main Filesystem::/dev/drbd0::/drbd::ext4 nfslock nfs

# first word is the hostname of the primary server then the IP 10.0.0.100 is the one I choose to be the virtual IP to be moved to the slave in case of a failure.

The last thing is to create the authentication file on both servers again with the same content:

# vi /etc/ha.d/authkeys

auth 3

3 md5 mypassword123

This password file should only be readable by the root user:

# chmod 600 /etc/ha.d/authkeys

Be the First to Comment!