In this post, i will share on how to enable auto-start for httpd daemon on CentOS 6.2. Assume that your centos server has installed httpd apache service.
[[email protected] ~]# chkconfig --level 35 httpd on
The chkconfig command with the –level switch indicates that some action needs to be done at the runlevels entered as its values. The first argument in the command is the package you want to affect and the second defines whether you want it on or off. In this case we want httpd service to be started when entering runlevels 3 and 5: If you not specifying the runlevels with the –level switch, chckconfig will make the changes for runlevels 3 and 5 automatically as below :
[[email protected] ~]# chkconfig httpd on