CenOS/Redhat系统自动服务开启和关闭

来源:互联网 发布:大学毕业生 知乎 编辑:程序博客网 时间:2024/06/06 09:34

自动启动一个新的服务:

1.在/etc/init.d/目录下找到服务脚本的名字e.g. mysqld or httpd

2.加入chkconfig

3.sudo /sbin/chkconfig --add mysqld

4.确认chkconfig.

5.sudo /sbin/chkconfig --list mysqld

6.设置为自动启动


关闭系统重启时的自动启动服务:

sudo /sbin/chkconfig mysqld off


原文链接:

http://www.abhigupta.com/2010/06/how-to-auto-start-services-on-boot-in-centos-redhat/

参考链接:

http://www.fedorafaq.org/basics/#startonboot

0 0