`
yunfuby1
  • 浏览: 10268 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

批量管理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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics