'Redhat/Centos: Control Apache Startup with Chkconfig'

RustyRazorblade Consulting RustyRazorblade Consulting
1 min read

Copy apachectl (or symlink it) to /etc/init.d/httpd, and add these two lines at the end of the comment section:

chkconfig: 2345 64 36

description: script for starting and stopping httpd

chkconfig –add httpd

These commands will now work:

service httpd start service httpd stop

Additionally, apache will start when the system boots. You can accomplish this by using rc.local too, if you prefer, but I think it’s more convenient to have everything be service based where you can use chkconfig to manage startup / shutdown.

Copy apachectl (or symlink it) to /etc/init.d/httpd, and add these two lines at the end of the comment section:

chkconfig: 2345 64 36

description: script for starting and stopping httpd

chkconfig –add httpd

These commands will now work:

service httpd start service httpd stop

Additionally, apache will start when the system boots. You can accomplish this by using rc.local too, if you prefer, but I think it’s more convenient to have everything be service based where you can use chkconfig to manage startup / shutdown.

RustyRazorblade Consulting

RustyRazorblade Consulting

Apache Cassandra Consultant and Distributed Systems Expert

Related Posts

Need Expert Help with Apache Cassandra?

Get professional consulting for your distributed systems challenges. Performance optimization, architecture design, and troubleshooting.