标签:mycat
#主master配置如下
cat /etc/keepalived/keepalived.conf
global_defs {
notification_email {
failover@firewall.loc
}
#notification_email_from Alexandre.Cassen@firewall.loc
#smtp_server 10.168.0.48
#smtp_connect_timeout 10
router_id nginx
}
vrrp_script chk_haproxy {
script "/etc/keepalived/chk_haproxy.sh"
interval 5
weight 2
}
vrrp_instance ha_71 {
state MASTER
interface eth0
virtual_router_id 71
priority 150
advert_int 5
authentication {
auth_type PASS
auth_pass ha8888
}
track_script {
chk_haproxy
}
virtual_ipaddress {
192.168.5.70/24 dev eth0 label eth0:1
}
}
}
#salve配置如下
cat /etc/keepalived/keepalived.conf
global_defs {
notification_email {
failover@firewall.loc
}
#notification_email_from Alexandre.Cassen@firewall.loc
#smtp_server 10.168.0.48
#smtp_connect_timeout 10
router_id nginx
}
vrrp_script chk_haproxy {
script "/etc/keepalived/chk_haproxy.sh"
interval 5
weight 2
}
vrrp_instance ha_71 {
state BACKUP
interface eth0
virtual_router_id 71
priority 100
advert_int 5
authentication {
auth_type PASS
auth_pass ha8888
}
track_script {
chk_haproxy
}
virtual_ipaddress {
192.168.5.70/24 dev eth0 label eth0:1
}
}
}
生产环境下mycat高可用方案mycat+keepalive(1)
标签:mycat
原文地址:http://huanghonglin.blog.51cto.com/11324462/1753683