chkconfig --level 5 httpd 关闭

chkconfig --level 5 httpd 关闭

当某个服务(尤其是 httpd)配置为在级别 3 和 5 中运行(在 CentOS 6.5 上)并且当前运行级别为 3 时,我通过 init 5 移至 5,然后 init 重新启动 httpd,在我看来这很愚蠢。有没有办法阻止这种行为?

答案1

可以通过关闭运行级别 5 的“httpd”服务来实现此行为。

chkconfig --level 5 httpd 关闭

这将禁止服务以运行级别 5 启动。

谢谢

相关内容