keeplive

[root@localhost ~]# cat /etc/keepalived/keepalived.conf
global_defs{

vrrp_script chk_http {
script "/usr/local/keepalived/nginx_pid.sh"
interval 9
weight 1
}


vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 50
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 123456
    }
track_script {
chk_http
}
    virtual_ipaddress {
        192.168.3.135
    }
}


vrrp_instance VI_2 {
    state BACKUP
    interface eth0
    virtual_router_id 49
    priority 99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
track_script {
chk_http
}
    virtual_ipaddress {
        192.168.3.135
    }
}
}

---------------------------------------------------------------------------

[root@localhost ~]# cat /etc/keepalived/keepalived.conf
global_defs{
vrrp_script chk_http {
script "/usr/local/keepalived/nginx_pid.sh"
interval 9
weight 1
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 50
    priority 99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 123456
    }
track_script {
chk_http
}
    virtual_ipaddress {
        192.168.3.135
    }
}


vrrp_instance VI_2 {
    state MASTER
    interface eth0
    virtual_router_id 49
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
track_script {
chk_http
}
    virtual_ipaddress {
        192.168.3.135
    }
}
}

 

本文出自 “风光坏家伙” 博客,转载请与作者联系!

你可能感兴趣的:(职场,local,interface,cat,休闲)