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.
[root@centos6 ~]# 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 :
[root@centos6 ~]# chkconfig httpd on