Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 articles.slicehost.com/2009/2/2/… –  Shyam Sundar C S Mar 11 '12 at 17:50

Your Answer

 
discard

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.