Red Hat / Centos: Web services not starting up on a server reboot

Ok, so your webserver has crashed. You reboot it and…and…nothing. No website.  Your apache / httpd and mysqld services have not restarted along with the server.  Here is how to check if they should and make them do so if they aren’t.

Here is how to check what services are set to be started on boot.  Via your SSH console type:

chkconfig –list

This will give you a list of services and their run-on-startup status.  Look for your httpd service and your mysqld service in the list.  If they are listed with  “off off off off off off” then they will not come on when the server reboots.

To switch them on enter this:

chkconfig httpd on

and

chkconfig mysqld on

Now, you can run the list command again and you should see something like “off on on on on off”, or similar, against our two favourite services.  Sorted.  You can always do a quick reboot now if this will not affect anyone to test it:

shutdown -r now

(Don’t forget the -r, else it won’t actually restart….oops)

If your services don’t start up now then something else is amiss.

 

 

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Apply your human brain cells and complete this highly complicated maths problem *