centos 6 与 centos 7 服务开机启动、关闭设置的方法

简单说明下 centos 6 与 centos 7 服务开机启动、关闭设置的方法:

 centos 6 :使用chkconfig命令即可。

我们以apache服务为例:

#chkconfig --add apache 添加nginx服务

#chkconfig apache on 开机自启nginx服务

#chkconfig apache off 关闭开机自启

#chkconfig --list | grep apache 查看

centos 7 :使用systemctl中的enable、disable 即可。
示例:

#systemctl enable apache.service 开机自启apache服务

#systemctl disable apache.service 关闭开机自启
---------------------
作者:hu_wen
来源:CSDN
原文:https://blog.csdn.net/hu_wen/article/details/80578589
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自www.cnblogs.com/xzlive/p/10069897.html