centos7 nginx负载均衡+keepalived高可用

搭建环境centos7 nginx负载均衡+keepalived高可用

131:keepalived+nginx
133:keepalived+nginx
134:web1
162:web2

1、做2个web

两台web做一样的操作
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用

134:centos7 nginx负载均衡+keepalived高可用

162:centos7 nginx负载均衡+keepalived高可用

查看效果centos7 nginx负载均衡+keepalived高可用

centos7 nginx负载均衡+keepalived高可用

2、做2个nginx负载2个web

131跟133同样操作
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用

查看效果,确保2个nginx都能负载均衡centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用

3、搭建配置keepalived

131跟133都装centos7 nginx负载均衡+keepalived高可用

centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
另一台只需要改master为backup,100改成80(整个配置文件就这些东西,其他全删掉)

4、然后web端2个做3个同样操作

1、centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用2centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用
3、centos7 nginx负载均衡+keepalived高可用
centos7 nginx负载均衡+keepalived高可用

5、开启keepalived

centos7 nginx负载均衡+keepalived高可用
现在查看效果centos7 nginx负载均衡+keepalived高可用

centos7 nginx负载均衡+keepalived高可用
到这里就结束了,谢谢观看0.0,期待你的一键三连