In the Redhat distribution a cool program is included. chkconfig that program controlls every default start or stop program located under /etc/init.d and creating and removing symlinks in every runlevel directorys /etc/rc*.d. If your default runlevel is 3 (this you can find out by typing runlevel after bootup) type
chkconfig --list | grep 3:on to find out which program/services that starts in runlevel 3.
To enable a program(mysql) in runlevel 3 type:
chkconfig --level 3 mysql on
The syntax is:
chkconfig --level 123456 <program> on|off
Read the manpage for this program to create your own start and stop scripts. With this program you dont have to go throw difficultis to create symlinks in every runlevel, which can take some time.
If you dont want to use this create your own start or stopscript and put it under /etc/init.d directory and create symlinks int the runlevel you want your program to start. You can also use /etc/rc.local file that are executed after all other services.
Enjoy!
