LVS + Keepalived

[root@centos7-3 keepalived]#modprobe ip_vs[root@centos7-3 keepalived]#ipvsadm-save > /etc/sysconfig/ipvsadm[root@centos7-3 keepalived]#systemctl start ipvsadm.service[root@centos7-3 keepalived]#cp keepalived.conf keepalived.conf.bak[root@centos7-3 keepalived]#vim keepalived.conf

图片[1] - LVS + Keepalived - MaxSSL图片[2] - LVS + Keepalived - MaxSSL

在192.168.1.44和192.168.1.55上分别部署nginx并添加虚拟网卡ip为192.168.1.200/32

图片[3] - LVS + Keepalived - MaxSSL图片[4] - LVS + Keepalived - MaxSSL

keepalived自动把虚拟ip配置在主代理服务器上

图片[5] - LVS + Keepalived - MaxSSL

轮询负载均衡功能正常

图片[6] - LVS + Keepalived - MaxSSL图片[7] - LVS + Keepalived - MaxSSL图片[8] - LVS + Keepalived - MaxSSL

图片[9] - LVS + Keepalived - MaxSSL

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享