try adding this to /etc/rc.d/rc.local:
echo "Starting Webserver"
/usr/local/apache/bin/apachectl start
assuming that you use apachectl normally to start apache. other than that, check the file permissions on the scripts you wrote to make sure they're executable. that or unreadable syntax could be what's stopping them from being run on startup
tommy wrote:
I would like to ask how to write a shell script to start apache automatically? I tried to write a shell script and place it in /etc/rc.d/init.d/ but it did not run at startup. Could you help me? I have the same problem of startup mysql when the linux start.