从51cto的抚琴煮酒那cp来的,稍做添加更改,简单实用。
#!/bin/bash
# Keeping only useful services
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
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sed -i 's/id:5:initdefault:/id:3:initdefault:/' /etc/inittab
init 3
sed -i 's/LANG="zh_CN.UTF-8"/LANG="en_US.UTF-8"/' /etc/sysconfig/i18n
source /etc/sysconfig/i18n
阅读(1826) | 评论(1) | 转发(0) |