1.配置要求
服务器:
server1:172.25.13.1 web1 rhel6.5
server2:172.25.13.2 web2 rhel6.5
server4:172.15.13.4 node1 rhel6.5
server5:172.25.13.5 node2 rhel6.5
VIP:172.25.13.100
软件:
keepalived-1.2.24.tar.gz
arptables_jf
httpd
2.软件安装及配置
[server1]
yum install -y httpd arptables_jf
echo 'ip addr add 172.25.13.100/24 dev eth0'>>/etc/rc.d/rc.local
/etc/rc.d/rc.local
arptables -A OUT -s 172.25.13.100 -j mangle --mangle-ip-s 172.25.13.1
/etc/init.d/httpd start
[server2]
yum install -y httpd arptables_jf
echo 'ip addr add 172.25.13.100/24 dev eth0'>>/etc/rc.d/rc.local
/etc/rc.d/rc.local
arptables -A OUT