在Linux上禁用Apache自动启动


8

我正在运行已安装Apache的CentOS。它会自动启动(脚本位于/etc/init.d中)。由于这是一台独立的数据库服务器,因此无需运行Apache。如何禁用启动?只是删除/etc/init.d中的文件?

Answers:


20

# chkconfig <servicename> off

然后进行验证:

chkconfig --list | grep <servicename>

因此,可能chkconfig httpd off您想阅读有关.NET的运行级别的信息man init。验证应返回httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off。如果要停止它而不重新启动run /etc/init.d/httpd stop。所有这些都需要使用root特权来完成。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.