shell
yinhangtian
开源是一种精神;分享是一种美德!!!一个测试运维小白
展开
-
企业日常巡检脚本
vim inspection.sh #!/bin/bash echo "#############系统信息#############" type=`uname` version=`cat /etc/redhat-release` kernel=`uname -a|awk '{print $3}'` time=`date +%F_%T` runningtime=`uptime|awk '{print...原创 2019-12-03 19:54:21 · 172 阅读 · 0 评论 -
shell脚本部署mysql主从
centos6两台 Master IP:192.168.88.153 Slave IP:192.168.88.152 配置免密登录 ssh-keygen -t rsa ssh-copy-id [email protected] 编写mysql_master脚本 #!/bin/bash service iptables stop setenforce 0 yum -y install mysq...原创 2019-12-02 17:02:29 · 599 阅读 · 0 评论 -
shell脚本批量创建用户
vim useradd.sh #!/bin/bash for ((i=1;i<=5;i=i+1)) do cat /etc/passwd|grep user$i #查看用户是否存在 if [ $? -eq 0 ] then echo "用户已存在 " else ...原创 2019-12-01 20:00:15 · 216 阅读 · 0 评论