写了一段批量管理的bash小程序,利用了redhat 原生的expect,wget包组,当然用ssh-key也能替代expect。
本文是之前的watchdate的shell脚本的改进wdate,同样先上图:1)脚本加入chkconfig管理 head -5 /etc/init.d/wdate #!/bin/bash #auth:chentp0601@qq.com # #wdate Start/Stop
linux bash启动停止脚本,可以套用
#!/bin/bash#auth chentp0601#date 20151123function menu(){clearcat <<EOF #this is base menu 1.[install lamp] 2.[install lnmp] 3.[exit]EOFread -p "please input 1-3:" list
######install libevent 1st########mkdir -p /home/chentp/tools/cd /home/chentp/tools/tar xf libevent-1.4.13-stable.tar.gz cd libevent-1.4.13-stable./configure make && make install####
#查了资料折腾半天,测出来了#参考http://blog.csdn.net/e421083458/article/details/19697701这个脚本不错。#依赖包yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel* libmcrypt* libtool* flex* pkgconfig* l
mysql recovery 1 (允许停机,不许丢数据)
mysql master slave 1
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号