Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 49158 invoked by uid 500); 17 Aug 2001 15:51:54 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 49125 invoked from network); 17 Aug 2001 15:51:54 -0000 Received: from swami.xs4all.nl (HELO mvdb.net) (qmailr@213.84.83.132) by h31.sny.collab.net with SMTP; 17 Aug 2001 15:51:54 -0000 Received: (qmail 12421 invoked from network); 17 Aug 2001 15:56:20 -0000 Received: from unknown (HELO guru) (10.1.2.1) by swami.xs4all.nl with SMTP; 17 Aug 2001 15:56:20 -0000 From: "Martin van den Bemt" To: Subject: RE: Why and How Tomcat before Apache? Date: Fri, 17 Aug 2001 17:51:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <020101c12733$0a9225d0$19c8bcd5@vega> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N yep ;-)) > -----Original Message----- > From: Roberto B. [mailto:roberto@ipermedianet.com] > Sent: Friday, August 17, 2001 5:41 PM > To: tomcat-user@jakarta.apache.org > Subject: Re: Why and How Tomcat before Apache? > > > Do I have to insert this script in my rc2.d dir. and link it in init.d ? > > R. > > ----- Original Message ----- > From: "David Cassidy" > To: > Sent: Friday, August 17, 2001 5:06 PM > Subject: Re: Why and How Tomcat before Apache? > > > > Ah what the hell try this ... > > ( works for me !) > > > > > > Watch out for the line wraps ! > > > > > > ------------- 8< -- snip > > #!/bin/sh > > > > # Init file for Jakarta Tomcat > > # > > # chkconfig: 345 98 00 > > # description: Jakarta tomcat daemon > > # > > # processname: > > # config: /usr/local/tomcat/conf/server.xml > > > > RETVAL=0 > > > > TOMCAT_HOME=/usr/local/tomcat > > export TOMCAT_HOME > > > > case "$1" in > > start) > > F=`$0 status` > > if [ "$?" = "255" ] ; then > > echo -n "Starting Tomcat : " > > su - tomcat -c "cd $TOMCAT_HOME/bin; > > $TOMCAT_HOME/bin/startup.sh > $TOMCAT_HOME/logs/tomcat_stdout.log 2> > > $TOMCAT_HOME/logs/tomcat_stderr.log" > > echo " [ OK ] " > > else > > echo "Tomcat is already running" > > fi > > echo > > ;; > > stop) > > F=`$0 status` > > if [ "$?" = "255" ] ; then > > echo "Tomcat isn't running" > > else > > echo -n "Shutting down Tomcat : " > > su - tomcat -c "cd $TOMCAT_HOME/bin ; > > $TOMCAT_HOME/bin/shutdown.sh > $TOMCAT_HOME/logs/tomcat_down_stdout.log > > 2> $TOMCAT_HOME/logs/tomcat_down_stderr.log" > > echo " [ OK ] " > > fi > > echo > > ;; > > restart) > > $0 stop > > sleep 2 > > $0 start > > RETVAL=$? > > ;; > > status) > > S=`ps auxww | grep org.apache.tomcat.startup.Tomca[t] | wc -l` > > E=`expr $S` > > if [ "$E" = "0" ] ;then > > echo "Tomcat is stopped" > > RETVAL=-1 > > else > > PIDS=`ps auxww | grep org.apache.tomcat.startup.Tomca[t] > > | awk '{FS=" "}{print $2}'` > > P=`echo $PIDS` > > echo "Tomcat ( $P ) is running" > > RETVAL=0 > > fi > > ;; > > *) > > echo "Usage: tomcat {start|stop|restart|status}" > > exit 1 > > esac > > > > exit $RETVAL > > > > ------------- 8< -- snip > > > > > > David Cassidy wrote: > > > > > > unless you want to run your tomcat as root ( Very unwise ) > > > makesure that you use a 'su' command in your > > > call to tomcat's start script... > > > > > > David > > > > > > Rui Miguel Seabra wrote: > > > > > > > > Just hack apachectl script to launch tomcat just before > apache, and to > > > > shut it down right aftwards. > > > > > > > > On 17 Aug 2001 16:43:41 +0200, Roberto B. wrote: > > > > > Ok ! but.. do you know the way to make this in automatic ( with > > > > scripts at > > > > > system start ) ?? > > > > > > > > > > ----- Original Message ----- > > > > > From: "Barnabas Yohannes" > > > > > To: > > > > > Sent: Friday, August 17, 2001 3:39 PM > > > > > Subject: Re: Why and How Tomcat before Apache? > > > > > > > > > > > > > > > > I cannot answer your "why" question, because, I am not > one of the > > > > > developers > > > > > > of apache or tomcat. But here is the answer to your "how" > > > question: > > > > > > > > > > > > *To stop and start your tomcat: > > > > > > > > > > > > cd /usr/local/tomcat > > > > > > > > > > > > bin/shutdown.sh > > > > > > > > > > > > bin/startup.sh > > > > > > > > > > > > *Exit from tomcat and go to your apache server: > > > > > > > > > > > > su > > > > > > > > > > > > /usr/local/apache/bin/apachectl restart > > > > > > > > > > > > exit > > > > > > > > > > > > * Another way of stopping and starting apache: > > > > > > > > > > > > bin/apachectl stop > > > > > > bin/apachectl start > > > > > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: "Roberto B." > > > > > > To: > > > > > > Sent: Friday, August 17, 2001 4:50 AM > > > > > > Subject: Why and How Tomcat before Apache? > > > > > > > > > > > > > > > > > > > I have a Linux/Debian system. > > > > > > > I want to use Apache as web-server and Tomcat only > for JSP file. > > > > > > > > > > > > > > Is it true that it is necessary to make start Tomcat before > > > > Apache? > > > > > Why?.. > > > > > > > and if it is true.. how?? > > > > > > > > > > > > > > Thanks! > > > > > > > Roberto. > > > > > > > > > > > > > > > > > > > > > > > -- > > > > + No matter how much you do, you never do enough -- unknown > > > > + Whatever you do will be insignificant, > > > > | but it is very important that you do it -- Ghandi > > > > + So let's do it...? > >