That's what installing via the RPMs usually does.

That notwithstanding, copy the attached file to your /etc/rc.d/init.d 
file...it's a standard RedHat httpd script from that very directory on 
one of my boxes.

Then, logged in as root, issue the following command:

ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S85httpd

You can also do the same for other run levels, substituting "rc3.d", 
"rc4.d" or even "rc2.d" in place of the "rc5.d" in the above command.

On Mon, 16 Oct 2000, Bob Hartung wrote:

> Hi,
>   I am making progress.  Apache, postgresql installed.  Now
> trying to make apache autostart on boot.  I could place a
> line in rc.local something like:
> 
>    /usr/local/apache/bin/apachectl start
> 
> 
>   but is there a way to place a file in init.d and then link
> to it from rc5.d?
> 
>   As I said, progress is progress for a newbie, but it is
> soooooooo slow.
> 
> 
> Thanks again to all who have helped!
#!/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)
        echo -n "Starting httpd: "
        daemon httpd
        echo
        touch /var/lock/subsys/httpd
        ;;
  stop)
        echo -n "Shutting down http: "
        killproc httpd
        echo
        rm -f /var/lock/subsys/httpd
        rm -f /var/run/httpd.pid
        ;;
  status)
        status httpd
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  reload)
        echo -n "Reloading httpd: "
        killproc httpd -HUP
        echo
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0

Reply via email to