1.keepalive只需在/etc 目录下建一个文件 keepalived.conf
vrrp_instance VI_1 {
state BACKUP
nopreempt
interface eth0
virtual_router_id 20
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
172.16.231.210/25 dev eth0 label eth0:0
}
track_interface {
eth0
}
#notify_master "/opt/nsfocus/controller/ncsp/ha/ha_vrrp_notify.py master"
#notify_backup "/opt/nsfocus/controller/ncsp/ha/ha_vrrp_notify.py backup"
}
然后启动: sudo keepalived
本文转自 a_liujin 51CTO博客,原文链接:http://blog.51cto.com/a1liujin/2045671,如需转载请自行联系原作者