Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I configure my CentOS 5.5 to autostart some applications after rebooting?
I want to start nginx, mysqld and call some commands like rvm use ree.

share|improve this question
up vote 5 down vote accepted

CentOS uses chkconfig to manage its startup scripts.
Type chkconfig --list to view the services that are configured to work with checkconfig, and their settings.
MySQL should already be in that list.

If it isn't already configured to be on at runlevel 3 (the default runlevel for centos servers), run chkconfig mysqld on

You could write your own startup script to work with chkconfig for Nginx. Then you'll be able to manage it the same way as MySQL.

To make the system run custom commands at startup, you can add them to the /etc/rc.local file.

share|improve this answer
thanks for the explanation, I will examine – fl00r Mar 15 '11 at 8:46
Since you mentioned RVM, REE, im presuming that you are going to install nginx for Passenger. There is an Nginx startup script at… – Shyam Sundar C S Mar 11 '12 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.