The following is a self-starting apache as an example;
Self-started script:
/ usr / local / apache2 / bin
./apachectl start
The file is located under /etc/rc.d/init.d, named Apached, pay attention to executive.
#CHMOD X /etc/rc.d/init.d/apached // Setting the properties of the file is executable
#LN -s /etc/rc.d/init.d/apached /etc/rc3.d/s90apache // Set up soft connection, shortcut
#LN -s /etc/rc.d/ininit.d/apached /etc/rc0.d/k20apache