Wow, when you step back, and you realize that among aaaaaaalll the computer books you have, there is something in one of them on this very problem that goes into detail about what happens at boot time, then everything is a whole lot better.
I got the answer in "administering Apache" by Arnold, Almeida, and Miller (McGraw Hill).
c. 2000 p. 68.
First, I went into /etc/rc.d/rc3.d and looked at the directory to figure out the appropriate start number for Apache. Since Apache is dependant on mail services that is listed as S80sendmail and possibly dependant on postgresql that we will one day use, that I found out usually defaults to S85, I'm starting apache at 86, so I make a note of that. I then go to /etc/rc.d/rc0.d directory and make the same determination for when to Kill apache process, after things that depend on it, are killed (Cold Fusion and some other stuff for me) and before sendmail and PostGre. So apache will be killed at 29 for me. I make a note of that.
then I copy the (apache root)/bin/apachectl script to /etc/rc.d/init.d .
Then I create start up script links to the apachectl script . I have it in the book as wanting to start at run level 2, instead of 3, so what the hell. i'll do that.
Quote:
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc2.d/S86apachectl
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc3.d/S86apachectl
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc4.d/S86apachectl
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc5.d/S86apachectl
|
Then, I'll create the kill scripts for the other run levels
Quote:
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc0.d/K29apachectl
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc1.d/K29apachectl
ln /etc/rc.d/init.d.apachectl /etc/rc.d/rc6.d/K29apachectl
|
(Notice I'm K29 - killing at 29 and S86 & starting at 86 for the various run-levels.)
And that's it! Now to test...
Shut down and reboot.
then after logging in again...
(or whatever arguments for ps is appropriate for my system. in this case, ax works)
and I get somethign like this :
387 ? S 0:00 (apache root)/bin/httpd
404 ? S 0:00 (apache root)/bin/httpd
405 ? S 0:00 (apache root)/bin/httpd
406 ? S 0:00 (apache root)/bin/httpd
407 ? S 0:00 (apache root)/bin/httpd
408 ? S 0:00 (apache root)/bin/httpd
which tells me its working! Oh Happy DAy!