摘要: [root@web03 scripts]# cat prevent_arp.sh #!/bin/bash lo_ip=$(ip a s lo|grep "10.0.0.1[3]/32"|wc -l) if [ $lo_ip -eq 0 ] then ip addr add 10.0.0.13/32 dev lo fi ip_cnf=$(egrep "net.ipv4.conf" ... 阅读全文
posted @ 2017-12-08 21:59 滴滴滴 阅读(317) 评论(0) 推荐(0) 编辑
摘要: [root@lb04 scripts]# cat ha_lv.sh #!/bin/bash while true do check_count=$(nmap 10.0.0.13|grep "Host is up"|wc -l) if [ ${check_count} -ne 1 ] then sh /server/scripts/lv_... 阅读全文
posted @ 2017-12-08 21:56 滴滴滴 阅读(425) 评论(0) 推荐(0) 编辑
摘要: [root@lb03 scripts]# cat lvm_health_check.sh #!/bin/bash web_ip=( 10.0.0.17 10.0.0.18 ) # 检查恢复就添加节点 web_add (){ i=$1 echo "添加节点 $i" ipvsadm -a -t 10.0.0.13:80 -r ${i}:80 -g -... 阅读全文
posted @ 2017-12-08 20:24 滴滴滴 阅读(464) 评论(0) 推荐(0) 编辑
摘要: linux上安装python3同时保留python2?这个就要用到上篇说到的path变量了。 具体介绍及操作 这里我下载python3.6版本来进行介绍 更新完毕!!enjoy!! 阅读全文
posted @ 2017-12-08 17:23 滴滴滴 阅读(8871) 评论(0) 推荐(0) 编辑
摘要: 下面是改过的比上面好 阅读全文
posted @ 2017-12-08 17:15 滴滴滴 阅读(250) 评论(0) 推荐(0) 编辑