企业高并发服务器负载均衡


--开启http服务器 apache
service httpd start

--关闭防火墙状态
service iptables stop
--关闭防火墙
chkconfig iptables off


node1 192.168.1.109 负载均衡主机
node2 192.168.1.112 负载均衡备机
node3 192.168.1.110 服务器1
node4 192.168.1.111 服务器2
node4 192.168.1.121 服务器3

--服务器机器配置

cd /etc/init.d/
touch realserver
vim realserver --配置虚拟ip virtualIp

cd /var/www/html/index.html    --修改httpd服务器静态页面
新建文件 touch index.html   
编辑文件 vim index.html


--负载均衡服务器配置:

cd /etc/keepalived/keepalived.conf --修改配置文件 , 配置virtualIp, realIp

cd /var/log/message/  --查看keepalived开启日志




附件列表

    原文地址:https://www.cnblogs.com/duenboa/p/6665546.html