首页 > 学院 > 操作系统 > 正文

LVS-DR-service配置

2024-06-28 16:01:44
字体:
来源:转载
供稿:网友
#!/bin/bashVip=192.168.100.2echo 'net.ipv4.conf.lo.arp_ignore=1' >> /etc/sysctl.confecho 'net.ipv4.conf.all.arp_ignore=1' >> /etc/sysctl.confecho 'net.ipv4.conf.lo.arp_announce=2' >> /etc/sysctl.confecho 'net.ipv4.conf.all.arp_announce=2' >> /etc/sysctl.confcat /etc/sysctl.conf | sort |uniq > /etc/sysctl.conf  #先输入 然后去重复 再写入/sysctl.confecho 1 > /PRoc/sys/net/ipv4/conf/lo/arp_ignoreecho 1 > /proc/sys/net/ipv4/conf/all/arp_ignoreecho 2 > /proc/sys/net/ipv4/conf/lo/arp_announceecho 2 > /proc/sys/net/ipv4/conf/all/arp_announceecho 'net.ipv4.conf.lo.arp_ignore=1 >> /etc/sysctl.conf'echo 'net.ipv4.conf.all.arp_ignore=1 >> /etc/sysctl.conf'echo 'net.ipv4.conf.lo.arp_announce=2 >> /etc/sysctl.conf'echo 'net.ipv4.conf.all.arp_announce=2 >> /etc/sysctl.conf'`ip addr add $VIP/32 dev lo:0``rm -rf /etc/sysconfig/network-scripts/ifcfg-lo:0`touch /etc/sysconfig/network-scripts/ifcfg-lo:0echo 'DEVICE=lo:0IPADDR='$VIP'NETMASK=255.255.255.255ONBOOT=yesNAME=lo:0' > /etc/sysconfig/network-scripts/ifcfg-lo:0
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表