LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   activate apache after redhad 7.1 install (https://www.linuxquestions.org/questions/linux-software-2/activate-apache-after-redhad-7-1-install-26028/)

csjosh 07-17-2002 11:25 PM

activate apache after redhad 7.1 install
 
Hello,

I just installed RedHad 7.1 and am trying to get apache to run so I can see web pages and run cgi programs on my computer but not online. I am new to apache, any suggestions? Thanks, Josh

j-ray 07-18-2002 05:30 AM

did you download apache or did you take the version that comes with rh?

csjosh 07-18-2002 12:27 PM

The version it came with. Apache won't startup on boot or shutdown on shutdown.

rverlander 07-19-2002 02:01 AM

dont use the rh7.1 ver, use a self-compiled 1

j-ray 07-19-2002 02:50 AM

i dont know where rh installs apache, so someoneelse may know better.
but u can try
`/usr/local/apache/bin/apachectl start` (stop/restart)
or sbin instead of bin
That would be the command for the current `default`installation.
Is there no HOWTO or README in the apache directory?
good luck,
jens

rverlander 07-19-2002 03:04 AM

Quote:

Originally posted by j-ray
i dont know where rh installs apache, so someoneelse may know better.
but u can try
`/usr/local/apache/bin/apachectl start` (stop/restart)
or sbin instead of bin
That would be the command for the current `default`installation.
Is there no HOWTO or README in the apache directory?
good luck,
jens

in rh its different, it uses the redhat layout in rh apache

csjosh 07-19-2002 05:59 PM

Thanks
 
Thanks. I found out where to start it manually, but it won't start up when I first boot the machine and shutdown when I shut down the machine.

nxny 07-19-2002 06:13 PM

As you already know, the startup script for apache under redhat is /etc/rc.d/init.d/httpd (stop|start|restart|reload).
Before we start,

a)have you installed XFree86?
b)If yes, do you use a graphical login prompt or do you login at a text prompt and then use 'startx'?

If you're using redhat, I'd probably think the answer to the first qn is YES. If then, go ahead and logon as yourself, and when you are in X, open a command prompt and type in serviceconf. You can also find it under the programs menu under sytem settings as 'Service configuration'. Type in the root password. Check the box for httpd in the window that pops up for runlevel 3 and runlevel 5 ( to cover both text and graphical login prompts).

If the answer to a) is no (you'll have to create a link to the startup script under the corresponding runlevel directories), let us know.

Nandu

neo77777 07-19-2002 06:15 PM

To start apache on boot up you need to modify your startup scripts, go to /etc/rc.d/ directory, there you'll find rc0.d trough 6 (they correspond to the appropriate runlevels), rc.local and a couple of more, what we need to do is just determine what runlevel should be modified, if you boot straight to X (GUI) your runlevel is set to 5, hence we need to modify runlevel 5 startup scripts - go to rc5.d in this case, do
ls -l
there you'll see symlinks pointed to ../init.d/executable. Note that every symlink starts with either K or S, K - is for kill don't start service, and S - is for start service, note also the two numbers following K os S it is a sequence number, now locate the one which contains httpd in its name, take a note where it points and a sequence number, now we need to change K link to S link with the same seq number, and final destination,
as root
ln -sf /where/original/points/to S##httpd
that's all next time you boot apache will start automatically.
A side note, make sure in runlevel 6 (reboot) rc6.d/ you have a symlink which kills apache (K##httpd) if there is none create it
ln -sf /where/apache/exec/is K##httpd
the same must be done for runlevel 0 (shutdown) as well.
Good luck.

csjosh 07-21-2002 02:16 AM

Thank You
 
Thank you very much. I will always be greatful of your help.


All times are GMT -5. The time now is 06:13 AM.