3.将Master服务器proxy节点上的主配置文件拷贝到Backup服务器proxy2节点稍作修改
# scp /etc/keepalived/keepalived.conf proxy2:/etc/keepalived/
######修改如下两项
[root@proxy2 ~]# vim /etc/keepalived/keepalived.conf
state BACKUP
priority 99
4.启动两台服务器上的Keepalived服务并设置为开机自启动
# chkconfig --add keepalived ; ssh proxy2 "chkconfig --add keepalived"
# chkconfig keepalived on ; ssh proxy2 "chkconfig keepalived on"
# chkconfig --list keepalived; ssh proxy2 "chkconfig --list keepalived"
keepalived 0:off 1:off 2:on 3:on 4:on 5:on 6:off
keepalived 0:off 1:off 2:on 3:on 4:on 5:on 6:off
启动服务:
# service keepalived start; ssh proxy2 "service keepalived start"