rpm -ql ipvsadm
rpm -y install ipvsadm
ifconfig eth0:1 192.168.2.150/24
实验环境是两台RealServer 静态IP分别为: 192.168.2.137 192.168.2.138
echo "1" >/proc/sys/net/ipv4/conf/eth0/arp_ignore echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce echo "2" >/proc/sys/net/ipv4/conf/eth0/arp_announce
ifconfig lo:1 192.168.2.150 netmask 255.255.255.255 broadcast 192.168.2.150
route add -host 192.168.2.150 dev eth0:1
route add -host 192.168.2.150 dev lo:1
yum -y install httpd #启动httpd service httpd start/stop/restart
192.168.2.137 192.168.2.138
#创建集群服务 ipvsadm -C ipvsadm -A -t 192.168.2.150:80 -s wlc ipvsadm -a -t 192.168.2.150:80 -r 192.168.2.138 -g -w 1 ipvsadm -a -t 192.168.2.150:80 -r 192.168.2.137 -g -w 1 #查看 ipvsadm -Ln ipvsadm -L
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。