httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Nelson" <pete.nel...@ci.stpaul.mn.us>
Subject Re: installing new Apache on RH Linux
Date Tue, 26 Mar 2002 14:11:22 GMT
Hey, me too!  I always throw out the RPM version and build my Apache
from scratch.  In order to get things working, I re-wrote
/etc/rc.d/init.d/httpd to wrap around apachectl (and it also gives me
the ability to do a graceful restart):

#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve
\
#              HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        /usr/local/apache/bin/apachectl start
        touch /var/lock/subsys/ahttpd
        ;;
  stop)
        /usr/local/apache/bin/apachectl stop
        rm -f /var/lock/subsys/ahttpd
        ;;
  status)
        status httpd
        ;;
  restart)
        /usr/local/apache/bin/apachectl graceful
        ;;
  reload)
        /usr/local/apache/bin/apachectl graceful
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0

##--end of /etc/rc.d/init.d/httpd

--
Pete Nelson, Web Developer
<pete.nelson@ci.stpaul.mn.us>
http://www.ci.stpaul.mn.us/

>>> EMoyer@LibraryTech.Com 03/26/02 08:06AM >>>
I have installed Red Hat 7.2 on a computer, and during the RH setup I
chose 
"web server", which means I get a httpd directory under /etc, and
scripts 
for httpd in the rcN startup system (forgive me if I am being too 
elementary, I am new to Linux).  The Apache ver installed with RH seems
to 
be 1.3.20, so I downloaded 1.3.24 and built and installed it, and now
have 
the new Apache under /usr/local/apache.

My question is, what is the best way to integrate the new Apache with
the 
RH system, particularly with regard to hooking it into the rc scripts
so it 
will start automatically?  I have thought of a couple ideas, but there
must 
be a "best" way, and I have no idea what that is.  I found only a very

little about startup scripts in the FAQs, and it did not help me.

Thanks.  -Eric


Regards,

Eric Moyer (EMoyer@LibraryTech.com)
Library Technologies, Inc.
2300 Computer Avenue, Suite D-19
Willow Grove, PA  19090
Phone 215-830-9320, FAX 215-830-9422


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
For additional commands, e-mail: users-help@httpd.apache.org 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message