mkdir -p /etc/keepalived/
ifconfig eth0:0 103.3.62.80 netmask 255.255.255.0 up
ifconfig eth0:1 103.3.62.80 netmask 255.255.255.0 up
/sbin/arping -c 5 -U -I eth0 103.3.62.80
global_defs
{
notification_email
{
<chenyangguang@newworld.so>
}
notification_email_from <admin@example.com>
smtp_server 127.0.0.1
stmp_connect_timeout 30
router_id lnmp_node1
}
vrrp_instance lnmp {
state MASTER
interface eth0
virtual_router_id 100
priority 200
advert_int 5
track_interface {
eth0
eth1
}
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
103.3.62.80
}
}
global_defs
{
notification_email
{
<chenyangguang@newworld.so>
}
notification_email_from <admin@example.com>
smtp_server 127.0.0.1
stmp_connect_timeout 30
router_id lnmp_node1
}
vrrp_instance lnmp {
state MASTER
interface eth0
virtual_router_id 100
priority 150
advert_int 5
track_interface {
eth0
eth1
}
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
103.3.62.80
}
}
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=103.3.62.80
NETMASK=255.255.255.0
GATEWAY=103.3.62.255
HWADDR=F2:3C:91:37:CD:93
USERCTL=no