LVS+Keepalived高可用负载均衡集群架构实验(2)


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"

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/347b0794cd36ebc25c13941acf18ab88.html