Portal Home > Knowledgebase > Tech Support > Servers > How do I automatically start a service after a reboot?

How do I automatically start a service after a reboot?

Red Hat and Red Hat based Linux distributions (such as CentOS used on our VPS accounts) make use of the script called chkconfig to enable and disable the system services running in Linux.


For example, to enable the apache webserver to start in certain run levels, you use the chkconfig script to enable it in the desired run levels as follows:
# chkconfig httpd --add
# chkconfig httpd on --level 235

This will enable the apache webserver to automatically start in the run levels 2, 3 and 5. You can check this by running the command:

# chkconfig --list httpd

One can also disable the service by using the off flag as shown below:

# chkconfig httpd off
# chkconfig httpd --del

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Live Chat
Speak with one of our live support reps!


Why Choose Us?
All of our web hosting plans come with the following cool features!
  • Powerful Control Panel
  • Online Based Website Builder
  • 3,000 Free Website Templates
  • One Click Script Installer
  • Unlimited Email accounts
  • Unlimited MySQL Databases
  • FREE Domain Name


Follow Us
Subscribe to SSA Host Announcements RSS
Follow Us on Twitter
Become a Fan on Facebook

website partners
Special Offer

Special Offer!

We want to give you 25% off the price of your A-La-Carte hosting package, for the life of your account! All you have to do is help us spread the word about the services we offer! Click the link below to get more information, and get your FREE coupon code for 25% off:

Special Offer