环境:
master:
backup: vip1:192.168.1.17 vip2:10.10.10.133
1,双网卡单VRRP实例配置 master: global_defs {
vrrp_sync_group VGM {
}
vrrp_instance VI_HA {
}
backp: global_defs {
vrrp_sync_group VGM {
}
vrrp_instance VI_HA {
}
2,双网卡双VRRP实例配置 master: global_defs {
vrrp_sync_group VGM {
}
vrrp_instance VI_HA_1 {
}
vrrp_instance VI_HA_2 {
}
backp: global_defs {
vrrp_sync_group VGM {
}
vrrp_instance VI_HA_1 {
}
vrrp_instance VI_HA_2 {
}
3,监控http服务,master恢复不抢占配置(双网卡可参考以下配置) master: global_defs {
vrrp_sync_group VGM {
}
###检查http进程或端口是否异常 vrrp_script chk_http_port {
#
}
vrrp_instance VI_HA {
virtual_ipaddress {
###执行以上命令 track_script {
}
backup: global_defs {
vrrp_sync_group VGM {
}
vrrp_script chk_http_port {
#
}
vrrp_instance VI_HA {
virtual_ipaddress {
track_script {
} (责任编辑:IT) |