cnxkey

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

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

 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 关闭开机自启

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-02-10
  • 2022-02-10
  • 2021-09-04
相关资源
相似解决方案