keepalived

[root@fjw421 ~]# cat /etc/keepalived/keepalived.conf
vrrp_script chk_nutcraker {
                script "                 interval 2
}
vrrp_script chk_redis {
                script "                 interval 2
}
vrrp_instance VI_2 {
       state MASTER        #both BACKUP
       interface eth0 
       virtual_router_id 55
       priority 101    #101 on master, 100 on backup
        #nopreempt       #both nopreempt
        track_script {
                chk_nutcraker
                chk_redis
        }
        virtual_ipaddress {
             10.10.42.55
        }
}

 

 

 

[root@fjw422 ~]# cat /etc/keepalived/keepalived.conf
vrrp_script chk_nutcraker {
                script "                 interval 2
}
vrrp_script chk_redis {
                script "                 interval 2
}
vrrp_instance VI_2 {
       state BACKUP        #both BACKUP
       interface eth0
       virtual_router_id 55
       priority 100    #101 on master, 100 on backup
        nopreempt       #both nopreempt
        track_script {
                chk_nutcraker
                chk_redis
        }
        virtual_ipaddress {
             10.10.42.55
        }

 

 

 

你可能感兴趣的:(常用命令)