-   Linux - Software (
-   -   httpd as a service (

joshf 07-09-2003 09:07 PM

httpd as a service
I installed apache2 from the source files. I want it to start as a service automatically.

When I use chkconfig --add httpd, it gives an error that it cannot find that service.

I have also tried the entire path:
chkconfig --add /etc/local/apache2/bin/httpd but it still gives that error.

My old version of Apache2 (which I deleted in order to upgrade) was installed from an RPM and it was a service.

How can I get this one to work the same way?

Mikx 07-09-2003 09:22 PM

I'm a newbie here, but i think the startup scripts for services are located in /etc/init.d. I think that doing a 'make install' after building apache would install the startup script for you already.

joshf 07-09-2003 10:01 PM

I did "make" and "make install"

I see scripts for many programs in that directory, but nothing like apache or httpd.

ftenario 07-10-2003 01:07 AM

Copy the startup script to /etc/init.d/ and make a symbolic link to this script from the run level you're running. This is what I did for Apache 1.3 (havent installed apache 2 from source yet). Since you said that you installed it from source, the startup script should be in the installation folder i.e. --prefix=path/to/apache/bin

Hope this helps.

linuxJaver 07-10-2003 07:25 AM

Just find out where the start-script of apache is isntalled, look in your makefile where the bindir is ..
The start-script is called apachectl, on slackware it resides in /usr/sbin/apachectl on redhat9 it is in /sbin/apachectl. Just type in prompt:
apachectl start , then u have it as service, to stop it type: apachectl stop

That all ..

joshf 07-10-2003 07:54 AM

Thank you for the help. I have it running now.

All times are GMT -5. The time now is 04:32 AM.