SSA Host
Please Login or Register   View Cart View Cart (0)   

Knowledgebase

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
What is Burst RAM? (Views: 691)





Quick Navigation

Reviews:
ΓΏ

Client Login

Email

Password

Remember Me

Search




Web Hosting Directory

Security Verified



Website monitoring
Uptime: 99.387%
Verified Rank: #13

Sirkels & Squares Alternative - carbon balanced web hosting with TerraPass

White Badge Partner: Sirkels & Squares Alternative, Carbon balanced by TerraPass

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

Google+