lab environment:
192.168.200.111 LVS DR pattern scheduler
192.168.200.112 httpd server
192.168.200.113 NFS shared server
192.168.200.114 httpd server
Configuration of the machine 111
yum -y install ipvsadm
ifconfig ens32:0 192.168.200.254 netmask 255.255.255.0
ipvsadm -A -t 192.168.200.254:80 -s rr
ipvsadm -a -t 192.168.200.254:80 -r 192.168.200.112:80 -g -w 1
ipvsadm -a -t 192.168.200.254:80 -r 192.168.200.114:80 -g -w 1
ipvsadm -Ln
112 and the configuration of the machine 114
yum -y install httpd
echo "1111111"> /var/www/html/index.html (114 may be a 33333)
systemctl start httpd
ifconfig lo:0 192.168.200.254 netmask 255.255.255.255
vim /etc/sysctl.conf
sysctl -p
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.default.arp_ignore = 1
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
test
testing successfully
Two shared storage
113 machine configuration
yum -y install rpcbind nfs-utils
vim /etc/exports
/opt/wwwroot 192.168.200.0/24(rw,no_root_squash,sync)
mkdir /opt/wwwroot
systemctl start rpcbind (advisable to open rpcbind)
systemctl start nfs
[root@localhost ~]# showmount -e
Export list for localhost.localdomain:
/opt/wwwroot 192.168.200.0/24
echo "choudidi" >> /opt/wwwroot/index.html
112 and 114 machine configuration
showmount -e 192,168,200,113
mount 192.168.200.113:/opt/wwwroot / var / www / html /
cat /var/www/html/index.html
Test input 192.168.200.112 on the page