ITPub博客

首页 > Linux操作系统 > Linux操作系统 > keepalived 做主备,检查80端口

keepalived 做主备,检查80端口

原创 Linux操作系统 作者:笑平风 时间:2015-05-20 16:08:33 0 删除 编辑
keepalived 的配置文件,主和备一样,只有priority 150 的值不同
! Configuration File for keepalived


global_defs {
   notification_email {
     acassen@firewall.loc
     failover@firewall.loc
     sysadmin@firewall.loc
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 5
   router_id Director1
}


vrrp_script chk_80_port {
script  " interval 1
weight -60
}


vrrp_instance VI_1 {
    state MASTER
    interface eth1
    virtual_router_id 51
    priority 150                      #主库为     priority 200    
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        172.16.2.122
    }
track_script {
chk_80_port
}
}

                         

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29798713/viewspace-1664092/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-09

  • 博文量
    75
  • 访问量
    194550