从51cto上看到的关闭无用服务脚本,不错
#!/bin/bash
for i in `ls /etc/rc3.d/S*`
do
CURSRV=`echo $i|cut -c 15-`
echo $CURSRV
case $CURSRV in
cpuspeed | crond | irqbalance | network | sshd | syslog | local )
echo "Base services, Skip!"
;;
*)
echo "change $CURSRV to off"
chkconfig --level 2345 $CURSRV off
service $CURSRV stop
;;
esac
done
阅读(1346) | 评论(0) | 转发(0) |