日期:2014-05-16  浏览次数:20583 次

批量管理Linux系统服务
批量管理Linux系统服务

#!/bin/sh
#关闭所有系统服务
for i in `chkconfig --list |awk '{print $1}'`;
do chkconfig $i off;
echo  chkconfig $i off;
done
#开启指定的服务
for i in crond network iptables messagebus udev-post ntpd sshd rsyslog sysstat;
do chkconfig $i --level 3 on;
echo chkconfig $i --level 3 on;
done