Chinaunix首页 | 论坛 | 博客
  • 博客访问: 942939
  • 博文数量: 80
  • 博客积分: 2380
  • 博客等级: 大尉
  • 技术积分: 1049
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-14 11:06
个人简介

Only to find a successful way, not to find excuses for failure!

文章分类

全部博文(80)

文章存档

2016年(2)

2015年(4)

2014年(10)

2013年(10)

2012年(7)

2011年(17)

2010年(30)

分类: LINUX

2013-04-27 23:45:42

批量管理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

阅读(2516) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~