|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Manually tarting Apache is possibel with 'apachectl start', but how to start it automatically ??
|
|
#2
|
|||
|
|||
|
If you are using RedHat, to start APACHE automatically place the following script
in /etc/rc.d/init.d/httpd (make sure is excutable) then create a symbolic link from this script to /etc/rc.d/rc3.d/ and name the link S80httpd. here is the script, u'll have to edit it to point to your apache installation dir. ============================================ #!/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: /usr/local/etc/httpd/logs/httpd.pid # config: /www/conf/access.conf # config: /www/conf/httpd.conf # config: /www/conf/srm.conf # the location of the file that will be used to record the process # id of the running apache server # # PIDFILE=/usr/local/etc/httpd/logs/httpd.pid PIDFILE=/usr/local/etc/apache_1.3.12/logs/httpd.pid # # the location of the apache daemon binary # BINFILE=/usr/local/etc/httpd/bin/httpd BINFILE=/usr/local/etc/apache_1.3.12/bin/httpd # # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting httpd: " daemon $BINFILE echo touch /var/lock/subsys/httpd ;; stop) echo -n "Shutting down http: " [ -f "$PIDFILE" ] && { kill `cat "$PIDFILE"` echo -n httpd } echo rm -f /var/lock/subsys/httpd rm -f "$PIDFILE" ;; status) status "$BINFILE" ;; restart) $0 stop $0 start ;; reload) echo -n "Reloading httpd: " [ -f "$PIDFILE" ] && { kill -HUP `cat "$PIDFILE"` echo -n httpd } echo ;; *) echo "Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0 ============================================= edit the PIDFILE and BINFILE variables to point to 'httpd.pid' and 'httpd' files. these files are locate in the Apache installation directory under he subdirectories 'logs/' and 'bin/'. hope this helps.. Rodrigo |
|
#3
|
|||
|
|||
|
How do you make httpd executable ?
|
|
#4
|
|||
|
|||
|
Go some error msg :
starting httpd: etc/rc5.d/S15httpd: daemon : command not found. had manually click on the httpd file and it works. My binfile per my installation is BINFILE=/usr/local/apache/bin/httpd Your BINFILE=/usr/local/etc/httpd/bin/httpd That is the only difference I can see. |
|
#5
|
|||
|
|||
|
Hi,
Another easy way... remove httpd service by type setup uncheck httpd then add in last line of /etc/rc.d/rc.local /usr/local/apache/bin/apachectl start good luck satit |
|
#6
|
|||
|
|||
|
I'm using apache 1.3.14 and i edited the file a little and it worked fine.
Thanks |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > How to auto boot Apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|