Keepalived 配置文件:

 

 

[root@localhost keepalived]# vi keepalived.conf
! Configuration File for keepalived


global_defs {
notification_email {
le_wenzhong@126.com
}
notification_email_from le_wenzhong@126.com
smtp_server smtp.126.com
smtp_connect_timeout 30
router_id LVS_DEVEL
}


#vrrp_sync_group VG_1 {
# group {
# VI_1
# }
# notify_master /etc/keepalived/sendmail.pl
#}

vrrp_script check_mysql {
script "</dev/tcp/127.0.0.1/3306"
interval 10
weight -30
}

vrrp_instance VI_1 {
state BACKUP
interface eth0
virtual_router_id 51
priority 90
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.0.67
}

track_script {
check_mysql
}
}

posted on 2016-08-31 15:26  le_wenzhong  阅读(119)  评论(0编辑  收藏  举报