'Redhat/Centos: Control Apache Startup With Chkconfig'

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.