nginx能夠實例負載均衡。html
準備工做
操做系統:歐拉2.8 arm
ecs-cecd-0002:192.168.0.141 #Nginx服務器
ecs-cecd-0001:192.168.0.8 #Web服務器
ecs-cecd-0003:192.168.0.92 #Web服務器nginx
配置web訪問
在ecs-cecd-0001與ecs-cecd-0003上安裝httpd:
yum install -y httpd
在ecs-cecd-0001:
echo 001 >> /var/www/html/index.html
在ecs-cecd-0003:
echo 003 >> /var/www/html/index.html
在ecs-cecd-0001與ecs-cecd-0003啓動httpd:
chmod 755 /var/www/html/index.html
systemctl start httpdweb
systemctl start nginx服務器