tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: tomcat as deamon
Date Tue, 13 Apr 2004 02:24:16 GMT
Allen,

Read this page. It will make a little more sense than the instructions on
the commons page.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

Note the last paragraph on the page. And the script has already been changed
for TC5.

Once you have completed these steps then you can put the script in init.d
and link it from the desired runlevels. Here is what my modified script
looks like:

# Adapt the following lines to your configuration
JAVA_HOME=/tomcat/jv
CATALINA_HOME=/tomcat/tc
DAEMON_HOME=/tomcat/tc/bin
TOMCAT_USER=tomcat
TMP_DIR=/var/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
  start)
    #
    # Start Tomcat
    #
    $DAEMON_HOME/jsvc \
    -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    -Djava.io.tmpdir=$TMP_DIR \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $CATALINA_OPTS \
    -cp $CLASSPATH \
    -Xms384m \
    -Xmx512m \
    org.apache.catalina.startup.Bootstrap
    #
    # To get a verbose JVM
    #-verbose \
    # To get a debug of jsvc.
    #-debug \
    ;;

  stop)
    #
    # Stop Tomcat
    #
    PID=`cat /var/run/jsvc.pid`
    kill $PID
    ;;

  *)
    echo "Usage tomcat start/stop"
    exit 1;;
esac

I also put a link in usr/bin to the script in init.d which allows me to do a
tomcat stop and tomcat start from anywhere to stop and start tomcat. My
script name is "tomcat" without the .sh .

Sorry if I am too verbose in my instructions.

Doug


----- Original Message ----- 
From: "Wilson, Allen" <Allen.Wilson@marcresearch.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Monday, April 12, 2004 6:59 PM
Subject: RE: tomcat as deamon


> Doug...
>
> I tried to figure out how to use the jsvc...I have it configured but I
> not sure how to use in in a class...any ideas'
>
> Allen
>
> -----Original Message-----
> From: Parsons Technical Services [mailto:parsonstechnical@earthlink.net]
>
> Sent: Monday, April 12, 2004 5:55 PM
> To: Tomcat Users List
> Subject: Re: tomcat as deamon
>
>
> Emerson,
>
> It depends. If you need to run tomcat on port 80, then you will need
> jsvc
> otherwise calling startup.sh should work.
>
> Doug
> www.parsonstechnical.com
>
>
> ----- Original Message ----- 
> From: "Emerson Cargnin" <emerson@tre-sc.gov.br>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Monday, April 12, 2004 5:39 PM
> Subject: tomcat as deamon
>
>
> > Anyone has experience in using tomcat as deamon??
> > What would be the best way? using jsvc??? or create a script to be
> > called by init.d?
> >
> > Would be enough to call startup.sh and shutdown in apache init.d
> script????
> >
> > -- 
> > Emerson Cargnin
> > Analista de Sistemas
> > Setor de Desenvolvimento de Sistemas - TRE-SC
> > tel : (048) - 251-3700 - Ramal 3181
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


----------------------------------------------------------------------------
----


> This message may contain proprietary or confidential company information.
> Any unauthorized use or disclosure is prohibited.
>
>
>


----------------------------------------------------------------------------
----


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



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


Mime
View raw message