Here are the steps that we did:
1. We installed Heartbeat, Pacemaker and Apache to the computers who acted as servers.
2. We assigned a static IP address to each server:
192.168.21.2 - active server
192.168.21.3 - passive server
3. Next, we changed the hostname of the servers (server1 - active; server2 - passive) then edited /etc/hosts file:
192.168.21.1 is the cluster IP which will be accessed by the client.
4. We edited the configuration files of heartbeat for both servers:
a. /etc/ha.d/authkeys
![]() |
| tells heartbeat to use the key #1 which is onethreeseven as md5 password |
c. /etc/ha.d/haresources
5. We started heartbeat on both servers using /etc/init.d/heartbeat command.
6. Finally, we tried if our set up worked.
We accessed 192.168.21.1 (cluster IP).
Then, we shutdown server1; server2 (192.168.21.3) took over.
Reference:
http://www.langeder.org/wordpress/high-available-server-using-heartbeat/





No comments:
Post a Comment