摘要: 参考文章 https://blog.csdn.net/yyTomson/article/details/85783753 https://www.cnblogs.com/zy-303/p/10273167.html 1,环境两台centos7主机IP地址为:172.16.103.12和172.16. 阅读全文
posted @ 2019-04-08 19:11 Withfeel 阅读(1002) 评论(0) 推荐(0) 编辑
摘要: 脚本内容: #!/bin/bash # ens=$(cat /proc/net/dev | awk '{if($2>0 && NR > 2) print substr($1, 0, index($1, ":") - 1)}' | grep "^e[a-z,0-9].*") ensurl=$"/etc 阅读全文
posted @ 2019-04-08 11:03 Withfeel 阅读(374) 评论(0) 推荐(0) 编辑
摘要: #脚本开始 #!/bin/bash cd /etc/yum.repos.d/ tar -zcvf yum.bak.tar.gz CentOS-* rm -rf CentOS* touch /etc/yum.repos.d/a.repo cat>/etc/yum.repos.d/a.repo <<EO 阅读全文
posted @ 2019-04-08 11:03 Withfeel 阅读(975) 评论(0) 推荐(0) 编辑
摘要: #脚本开始 #!/bin/bash HOSTLIST=`cat /usr/local/ipaddrs.txt` for IP in $HOSTLIST do ping -c 3 -i 0.2 -W 3 $IP &> /dev/null if [ $? -eq 0 ] then echo "Host 阅读全文
posted @ 2019-04-08 11:03 Withfeel 阅读(1138) 评论(0) 推荐(0) 编辑