tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pau Ruiz Perez <...@comb.es>
Subject RE: autostart from apache
Date Thu, 11 Jan 2001 09:48:03 GMT
I've edited the /etc/rc.d/init.d/httpd for autostart the tomcat when the 
apache starts, and shutdown it, when the apache stops, thinking on a RedHat 
7 machine, just do this:

1.- I installed tomcat on /var/tomcat, please change path to match your 
system

2.- Created a file hello.sh, on /var/tomcat containing the following:
  #! /bin/sh
  TOMCAT_HOME=/var/tomcat/
  JAVA_HOME=/usr/java/jdk1.3/
  export TOMCAT_HOME JAVA_HOME

3.- Edit /etc/rc.d/init.d/httd. In the part:
  start() {
# Here we will start the tomcat
# I did this file to set the environment variables
  source /var/tomcat/hello.sh
# Now for the tomcat
  echo -n "Arrancando tomcat"
  /var/tomcat/bin/startup.sh
# End of the place to edit
  echo -n "Starting httpd: "
  ...
  }

4.- In the same file, in the part:
  stop() {
  ...
  echo "Apagando tomcat"
  /var/tomcat/bin/shutdown.sh
  ...
  }

  When you restart the httpd service, the tomcat stop and start 
simultaneosly.

  On RedHat 6.x, you've to do something like this on the start) and stop) 
parts of the file

  Good luck, this worked for me, but I think we all must be aware that any 
upgrade of apache will override this changes, keep the changes in a file to 
make cut & paste when this will occurs.

   Pau
------------------------------------------------------------------------  
-----------------------------------
  Col.legi Oficial de Metges de Barcelona (COMB)
  Dept. Internet (METGES on line)
  web: http://www.comb.es e-mail: pau@comb.es
  Placa Francesc Macia, 4,1er 2a
  08021 Barcelona
  Tel.: 93/362 08 50 Fax.: 93/414 22 22
 
------------------------------------------------------------------------  
-----------------------------------


-----Mensaje original-----
De:	Rikard Westlund [SMTP:rikard.westlund@celltribe.com]
Enviado el:	miercoles 10 de enero de 2001 14:40
Para:	'tomcat-user@jakarta.apache.org'
Asunto:	SV: autostart from apache

>From the userguide

"Instruct jserv not to start the Tomcat process. Automatically starting
Tomcat is not implemented yet. "

-----Ursprungligt meddelande-----
Fran: Andriy.Bilous@satama.de [mailto:Andriy.Bilous@satama.de]
Skickat: den 10 januari 2001 14:20
Till: tomcat-user@jakarta.apache.org
Amne: autostart from apache




 Just one little question. can i start tomcat from apache like jserv? i've
 compile mod_jk and add LoadModule directive in httpd.conf. but any
 servlets not working until i start tomcat manually...

--
E-mail: bella@tro.de


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message