2019年12月3日

企业日常巡检脚本

摘要: #!/bin/bash echo "#############系统信息#############"type=`uname` version=`cat /etc/redhat-release` kernel=`uname -a|awk '{print $3}'` time=`date +%F_%T` 阅读全文

posted @ 2019-12-03 19:49 tian01010 阅读(203) 评论(0) 推荐(0)

2019年12月2日

shell脚本部署mysql主从

摘要: centos6两台 Master IP:192.168.88.152 Slave IP:192.168.88.153 以下都是在主机上操作 两机配置免密登录 ssh-keygen -t rsa ssh-copy-id root@192.168.88.153 编写mysql_master脚本 vim 阅读全文

posted @ 2019-12-02 16:51 tian01010 阅读(332) 评论(0) 推荐(0)

2019年11月30日

批量创建user用户

摘要: 1 #!/bin/bash 2 3 for ((i=1;i<=5;i=i+1)) 4 do 5 cat /etc/passwd|grep user$i 6 if [ $? -eq 0 ] 7 then 8 echo "用户已存在 " 9 else 10 a=`openssl rand -base64 阅读全文

posted @ 2019-11-30 11:58 tian01010 阅读(192) 评论(0) 推荐(0)

导航