Category Archives: run startup linux

Running startup scripts on CentOS Linux (Fedora or RHEL)

Every distro has different ways of handling start up scripts. I maintain a pretty busy server and occasionally it needs to be restarted. There are a couple of Java services that need to run as well as a chat server that needs to be started.

CentOS (and all other distros built around the Red Hat model) use a really simple method. There is a script /etc/rc.local, that you can place all of your startup items in.

Here is a simple example

# All the other init scripts will run first. rc.local runs after them
sh /var/www/virtual/webapps/RealChatNew/realchat start

That’s really is all there is to it. There’s your handy little tip for the day!