本文共 1490 字,大约阅读时间需要 4 分钟。
[root@node2 ~]# yum install keepalived -y
[root@node1 ~]# yum install tcpdump[root@node1 ~]# tcpdump -n -i ens33 'host 224.0.0.18'[root@node1 ~]# ip add li[root@node1 ~]# systemctl start haproxy[root@node1 keepalived]# tail -2000 /etc/keepalived/keepalived.conf
! Configuration File for keepalivedglobal_defs {
notification_email { root@xkq.com }notification_email_from haproxy_ha@xkq.comsmtp_server 127.0.0.1smtp_connect_timeout 30router_id haproxy_havrrp_skip_check_adv_addr#vrrp_strictvrrp_garp_interval 0vrrp_gna_interval 0}vrrp_instance HAPROXY_HA {
state MASTERinterface ens33virtual_router_id 51priority 150advert_int 1authentication { auth_type PASSauth_pass 123456}virtual_ipaddress { 192.168.1.21192.168.1.22192.168.1.23192.168.1.24192.168.1.25192.168.1.26}}[root@node1 keepalived]#[root@node2 keepalived]# tail -2000 /etc/keepalived/keepalived.conf
! Configuration File for keepalivedglobal_defs {
notification_email { root@xkq.com }notification_email_from haproxy_ha@xkq.comsmtp_server 127.0.0.1smtp_connect_timeout 30router_id haproxy_havrrp_skip_check_adv_addr#vrrp_strictvrrp_garp_interval 0vrrp_gna_interval 0}vrrp_instance HAPROXY_HA {
state BACKUPinterface ens33virtual_router_id 51priority 100advert_int 1authentication { auth_type PASSauth_pass 123456}virtual_ipaddress { 192.168.1.21192.168.1.22192.168.1.23192.168.1.24192.168.1.25192.168.1.26}}[root@node2 keepalived]#转载于:https://blog.51cto.com/qqran/2170960