How to set Apache start at boot time on Linux
March 29, 2012 at 12:55 am Leave a comment
If you feel lazy to restart the httpd service everytime your machine boot up, just do following simple steps:
- Enter below command to show the runlevel information of the httpd service
chkconfig –list | grep httpd
- You get something like this:
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
- Then, set up httpd to start at boot time.
chkconfig httpd on
- Now to can verify by reviewing the runlevel information of the httpd service
chkconfig –list | grep httpd
- Output should be.
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- You’ve done !
If you just want to enable the servive for a certain runlevel (e.g. graphic mode or non graphic mode), you can use below command instead where 3 indicates the runlevel.
- chkconfig –level 3 httpd
This method can be applied to enable/disable other services at boot time. So, to list available services on your machine, run the command:
- chkconfig –list
Thanks http://www.linuxforums.org for this simple solution.
Entry filed under: Linux, Web Programming. Tags: Apache, boot time, How to set Apache start at boot time on Linux, httpd, Linux.
Trackback this post | Subscribe to the comments via RSS Feed