标签:Linux KeepAlived 高可用
1、确保确保iptables及selinux不会成为阻碍。保持集群时间同步2、在ka1上
vim /etc/keepalived/keepalived.conf
global_defs { notification_email { root@localhost } notification_email_from keepalived@localhost smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id proxy1 vrrp_mcast_group4 224.1.1.1 } vrrp_instance VI_1 { state MASTER interface eth1 virtual_router_id 66 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 172.18.0.200/16 } } vrrp_instance VI_2 { state BACKUP interface eth1 virtual_router_id 88 priority 80 advert_int 1 authentication { auth_type PASS auth_pass 654321 } virtual_ipaddress { 172.18.0.201/16 } }
2、在proxy2上
vim /etc/keepalived/keepalived.conf
! Configuration File for keepalived global_defs { notification_email { root@localhost } notification_email_from keepalived@localhost smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id proxy2 vrrp_mcast_group4 224.1.1.1 } vrrp_instance VI_1 { state BACKUP interface eth1 virtual_router_id 66 priority 80 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 172.18.0.200/16 } } vrrp_instance VI_2 { state MASTER interface eth1 virtual_router_id 88 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 654321 } virtual_ipaddress { 172.18.0.201/16 } }
标签:Linux KeepAlived 高可用
原文地址:http://blog.51cto.com/13520924/2094220