LVS+KEEPALIVED
安装master和backup 安装前准备 yum -y install openssl openssl-devel popt popt-devel gcc* wget vim ipvsadm pcre pcre-devel 运行ipvsadm 查看内核模块是否存在 lsmod|grep ip_vs 设置master /etc/keepalived/文件 vim /etc/keepalived/keepalived.conf ! Configuration File for keepalived vrrp_instance VI_1 { state MASTER interface ens192 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.0.108 } } virtual_server 192.168.0.108 80 { delay_loop 6 #lb_algo rr lb_algo wlc lb_kind DR persistence_timeout 0 protocol TCP real_server 192.168.0.103 80 { weight 1 TCP