标签:tab top ipv4 system systemctl real work enforce emc
LVS服务器:192.168.200.111
[root@real ~]# iptables -F
[root@real ~]# systemctl stop firewalld
[root@real ~]# setenforce 0
[root@director ~]# yum -y install ipvsadm
[root@director ~]# ipvsadm -A -t 172.16.1.1:80 -s rr
[root@director ~]# ipvsadm -a -t 172.16.1.1:80 -r 192.168.200.112:80 -m -w 1
[root@director ~]# ipvsadm -a -t 172.16.1.1:80 -r 192.168.200.113:80 -m -w 1
[root@lvs ~]# ip a //配置两块网卡
ens32 inet 192.168.200.111/24
ens35 inet 172.16.1.1/24
[root@lvs ~]#echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
real服务器:192.168.200.112
[root@real ~]# iptables -F
[root@real ~]# systemctl stop firewalld
[root@real ~]# setenforce 0
[root@real ~]# vim /etc/sysconfig/network-scrippts/ifcfg-ens32
将网关改为192.168.200.111
[root@real ~]# systemctl start network
[root@real ~]# yum -y install httpd
[root@real ~]# echo 111111 > /var/www/html/index.html
[root@real ~]# systemctl start httpd
real服务器 192.168.200.113 同上
标签:tab top ipv4 system systemctl real work enforce emc
原文地址:https://www.cnblogs.com/lyqlyqlyq/p/11641873.html