In this example we will configure a webserver using apache and we will cluster it. It can be implemented on centos, fedora and other redhat flavors.
Following are the hostnames and ipv4 addresses that will be used:
- 192.168.1.15 prime ( webserver)
- 192.168.1.16 calc (webserver)
- 192.168.1.20 sigma (ha address)
1. Download and install the heartbeat package. In our case we are using CentOS so we will install heartbeat with yum:
yum install heartbeat
or download these packages:
2. Now we have to configure heartbeat on our two node cluster. We will deal with three files. These are:
- /etc/ha.d/ha.cf: protocol, server options and servers.
- /etc/ha.d/authkeys: shared keysfile
- /etc/ha.d/resources: resource definitions
For the example setup the ha.cf file looks like the following:
debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 10 udpport 694 bcast eth0 node prime node calc auto_failback on
The above options are…
View original post 716 more words