How to start a httpd service when rebooting linux ?

How to make sure your service starts when you server reboot? It is practical so you do not have to ssh into your machine everytime you want to start your web server. Find below the command used for that effect

sudo chkconfig --levels 0123456 httpd on

Here explanation of levels

0   Halt
1   Single-User mode
2   Multi-user mode console logins only (without networking)
3   Multi-User mode, console logins only
4   Not used/User-definable
5   Multi-User mode, with display manager as well as console logins (X11)
6   Reboot

Make it happen – Automate things become a senior software engineer

Leave a Reply