sudo ./apachectl restart
Any suggestions would be very appreciated. Thanks!
/etc/init.dand then linked to the appropriate
/etc/rc.d/rcN.ddirectory. Local initialization is done in the file
/etc/rc.local. Scripts in the
rcN.ddirectories that begin with the letter
Sare run when the system enters run level
Nto start services, and those that begin with the letter
Kare run to kill services. Most Unix servers will be running in run level 3 or run level 5.
httpd; this is located in
/etc/init.d. Then in
/etc/rc5.dthere are symbolic links pointing back to this that start apache. Each of these is called
S87httpd(the number just controls the order in which the scripts are run).
# cp apachectl /etc/init.d/apacheand then make symbolic links in the appropriate rc directories, e.g.,
# cd /etc/rc3.d; ln -s ../init.d/apache ./S99apache(on some systems, it may be necessary to change the above to
# cd ../rc4.d; ln -s ../init.d/apache ./S99apache
# cd ../rc5.d; ln -s ../init.d/apache ./S99apache
cd /etc/rc.d/rc3.dand the link command to
ln -s ../../init.d/apache ./S99apache). I arbitrarily picked S99 so that apache would then start at the end of the process.
/etc/rc.localby adding a line at the end of that file to start it, e.g.,
Now set up things so that Apache starts automatically at boot up.
# cd /etc/init.d # cp boot.local boot.local.bak1 # kwrite boot.localand add the line
/usr/local/apache2/bin/apachectl startto the end of the file. Then save the file and quit.