centos6.x开机自启动服务

##关闭所有服务
for sun in chkconfig --list|grep 3:on|awk '{print $1}';do chkconfig --level 3 $sun off;done

##启动必要服务(可以根据实际需要修改)
for sun in YDService atd crond rsyslog sshd network udev-post sysstat vm-agent;do chkconfig --level 3 $sun on;done

猜你喜欢

转载自blog.51cto.com/9625010/2400728