Login to Members Area

Choose the service you want to log in
24x7x365 Presence
Live Chat

Hosting Blog


How to make a service stay ON after a reboot?

Sometimes it happens that a server has been rebooted but we forgot to check if the services which were started before the reboot are still up - and sometimes this creates issues.

There is a utility in Linux - 'chkconfig' - using which we can turn a service on even after rebooting the Linux server or machine. It is a command-line utility as below :-

chkconfig --list

The command below will display all the services and the runlevels on which the particular
service is on or off:-

[[email protected] ~]# chkconfig --list

httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off

Now to make a particular service stay on after the reboot we need to use the command below:-

[[email protected] ~]# chkconfig httpd on

and then re-check the httpd service status using the command below:-

[[email protected] ~]# chkconfig httpd --list

httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

That's all. Now whether our Linux server/machine will reboot or not the httpd service will remain started on it.

Sachin Wednesday 02 October 2013 - 04:56 am | | Default

No comments

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.