HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Apache from source on SuSE 9 (http://www.howtoforge.com/forums/showthread.php?t=123)

Brenton 25th July 2005 17:57

Apache from source on SuSE 9
 
Hi

I have just installed Apache 2 on SuSE 9. Just need a bit of help on how to set up my runlevels.

Apache installed to /usr/local/apache/

How do I set things up so that apache starts automatically?
How do I set things up so that I don't have to type the whole path (/usr/local/apache/bin/....) to control apache2?

Sorry if these are basic questions. I have googled, but info is overwhelming and confusing.

Brenton

flo 25th July 2005 18:40

Do you have an init script for Apache in /etc/init.d (e.g. /etc/init.d/apache)? If not, create one (like this; you need to adjust the paths in it!):

Code:

#!/bin/sh
         
case "$1" in
start)
  /usr/sbin/apachectl startssl
;;
stop)
  /usr/sbin/apachectl stop
;;
restart)
  $0 stop && sleep 3
  $0 start
;;
reload)
  $0 stop
  $0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

Then make it executable:
Code:

chmod 755 /etc/init.d/apache
The command
Code:

chkconfig --levels 235 apache on
will make your Apache start at boot time (in the run levels 2, 3, and 5).

Flo


All times are GMT +2. The time now is 07:31.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.