NGINX 之 Keepalived高可用简单使用 之十
! Configuration File for keepalived global_defs {notification_email {
345619885@qq.com
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 192.168.200.1
smtp_connect_timeout 30
router_id lb01 #id为lb01,不同的keepalived.conf此ID要唯一
}
vrrp_instance VI_1 { #实例名字为VI_1,相同实例的备节点名字要和这个相同
state MASTER #主状态为MASTER(必须大写),备节点为BACKUP
interface eth2 #通信接口网卡
virtual_router_id 51 #实例ID为51,keepalived.conf里唯一
priority 150 #优先级为150,数值越大,优先级越高,与BACKUP对比
advert_int 1 #通信检查间隔为1秒
authentication {
auth_type PASS #PASS认证类型
auth_pass 2222 #密码为2222
}
virtual_ipaddress {
10.3.151.228/24 dev eth2 label eth2:1 #虚拟IP地址
}
}
页:
[1]