tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kotsiras, Alexandros" <AKotsi...@mediaondemand.com>
Subject RE: Tomcat running on NT4 server
Date Fri, 28 Jul 2000 21:05:13 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: Tomcat running on NT4 server</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>jk_nt_service is the recommended approach, </FONT>
<BR><FONT SIZE=2>but you can also have NT execute the startup.bat file whenever
it reboots. </FONT>
<BR><FONT SIZE=2>The &quot;plus&quot; of this approach is that you can
see your System.out.println() on the DOS console ... if it matters.</FONT>
</P>
<BR>

<P><FONT SIZE=2>Alex.</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: David M. Holmes [<A HREF="mailto:david_m_holmes@yahoo.com">mailto:david_m_holmes@yahoo.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Friday, July 28, 2000 11:53 AM</FONT>
<BR><FONT SIZE=2>To: tomcat-user@jakarta.apache.org</FONT>
<BR><FONT SIZE=2>Subject: RE: Tomcat running on NT4 server</FONT>
</P>
<BR>

<P><FONT SIZE=2>Use the jk_nt_service.exe to setup Tomcat to run as service...</FONT>
</P>

<P><FONT SIZE=2>--- Jaime Vasquez &lt;Jaime@BinarTek.com&gt; wrote:</FONT>
<BR><FONT SIZE=2>&gt; Gal Shachor from IBM help me out on this one a couple
of months ago here is</FONT>
<BR><FONT SIZE=2>&gt; the stuff he provided</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Jaime Vasquez</FONT>
<BR><FONT SIZE=2>&gt; jaime@binartek.com</FONT>
<BR><FONT SIZE=2>&gt; (781) 238 - 6144 ext. 14</FONT>
<BR><FONT SIZE=2>&gt; www.binartek.com</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=2>&gt; From: Luiz Guilherme Freitas de Paula [<A HREF="mailto:moonsite@gold.com.br">mailto:moonsite@gold.com.br</A>]</FONT>
<BR><FONT SIZE=2>&gt; Sent: Friday, July 28, 2000 9:34 AM</FONT>
<BR><FONT SIZE=2>&gt; To: tomcat-user@jakarta.apache.org</FONT>
<BR><FONT SIZE=2>&gt; Subject: Tomcat running on NT4 server</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Hi,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; How can I start Tomcat in my NT4 server without having
to log on and use the</FONT>
<BR><FONT SIZE=2>&gt; BAT file?</FONT>
<BR><FONT SIZE=2>&gt; Is there a way to use it like a service?</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Thanks,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Luiz Guilherme</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
</P>

<P><FONT SIZE=2>&gt; ATTACHMENT part 2 application/octet-stream name=jk_nt_service.exe</FONT>
</P>

<P><FONT SIZE=2>&lt;HR&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;!--</FONT>
<BR><FONT SIZE=2>$Header: /home/cvs/jakarta-tomcat/src/doc/NT-Service-howto.html,v
1.2 2000/05/03 13:38:18 shachor</FONT>
<BR><FONT SIZE=2>Exp $</FONT>
<BR><FONT SIZE=2>$Revision: 1.2 $</FONT>
<BR><FONT SIZE=2>$Date: 2000/05/03 13:38:18 $</FONT>
<BR><FONT SIZE=2>--!&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;html&gt;</FONT>
<BR><FONT SIZE=2>&lt;head&gt;</FONT>
<BR><FONT SIZE=2>&lt;meta http-equiv=Content-Type content=&quot;text/html&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;title&gt;Working with the Jakarta NT Service&lt;/title&gt;</FONT>
<BR><FONT SIZE=2>&lt;/head&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;body&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;h1&gt;Working with the Jakarta NT Service&lt;/h1&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;p&gt;By Gal Shachor</FONT>
<BR><FONT SIZE=2>&lt;tt&gt;&amp;lt;&lt;a href=&quot;<A
HREF="mailto:shachor@il.ibm.com">mailto:shachor@il.ibm.com</A>&quot;&gt;shachor@il.ibm.com&lt;/a&gt;&amp;gt;</FONT>
<BR><FONT SIZE=2>&lt;/tt&gt;&lt;/p&gt;</FONT>
</P>
<BR>

<P><FONT SIZE=2>&lt;p&gt;The Jakarta NT service is an executable that
wraps the</FONT>
<BR><FONT SIZE=2>Tomcat servlet container and executes it in the background as
an NT service. To</FONT>
<BR><FONT SIZE=2>install it you will need to:&lt;/p&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;ol&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Get a</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; hold on the NT executable
(jk_nt_service.exe)&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Download</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the executable
from &lt;a</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2>href=&quot;<A HREF="http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/bin/nt_service/jk_nt_service.exe?rev=1.1"
TARGET="_blank">http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/bin/nt_service/jk_nt_service.exe?rev=1.1</A>&quot;&gt;<A
HREF="http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/bin/nt_service/jk_nt_service.exe?rev=1.1"
TARGET="_blank">http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/bin/nt_service/jk_nt_service.exe?rev=1.1</A>&lt;/a&gt;</FONT></P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and save it
under the name jk_nt_service.exe.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Customize</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; a properties file that
provides the service with Tomcat information</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; (wrapper.properties).&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Download</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a template
from &lt;a</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2>href=&quot;<A HREF="http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/src/etc/wrapper.properties?rev=1.1"
TARGET="_blank">http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/src/etc/wrapper.properties?rev=1.1</A>&quot;&gt;<A
HREF="http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/src/etc/wrapper.properties?rev=1.1"
TARGET="_blank">http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/src/etc/wrapper.properties?rev=1.1</A>&lt;/a&gt;</FONT></P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and save it
under the name wrapper.properties.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Update</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the wrapper.tomcat_home
property to point at your tomcat home.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Update</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the wrapper.java_home
property to point at your Java home.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Install</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; jk_nt_service by running
it with the -i flag.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Execute</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jk_nt_service
-I &amp;lt;name of service&amp;gt; &amp;lt;path to updated wrapper</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; properties&amp;gt;&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;&amp;lt;name</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of service&amp;gt;
should be a single word (without and spaces) such as</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jakarta&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;&amp;lt;path</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to updated
wrapper properties&amp;gt; should point to your wrapper.properties</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file (and
the service will check it's existence.)&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;For</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; example, a
valid command line can be jk_nt_service -I Jakarta wrapper.properties&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Start</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; tomcat as a service.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;From</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the command
line, execute net start &amp;lt;name of service&amp;gt; (e.g. net</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start Jakarta)&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;From</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the NT services
applet, highlight your service and press start.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Stop</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; Tomcat as a service.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;From</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the command
line, execute net stop &amp;lt;name of service&amp;gt; (e.g. net</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop Jakarta)&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;From</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the NT services
applet, highlight your service and press stop.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&lt;/ol&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;p&gt;&lt;b&gt;Special note&lt;/b&gt;:
The Tomcat service is using AJPV12 to</FONT>
<BR><FONT SIZE=2>perform clean shutdown and you should make sure that an AJPV12
connector is</FONT>
<BR><FONT SIZE=2>defined in your server.xml. In the absence of a configured AJPV12
port the</FONT>
<BR><FONT SIZE=2>Tomcat service will kill Tomcat abruptly (that is murder it)
without giving it</FONT>
<BR><FONT SIZE=2>a chance to clean up. &lt;/p&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;h1&gt;Advance Setup&lt;/h1&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;ol&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Modify</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; the Tomcat NT service
properties. By default the service will run in manual</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; mode and under the local
system user account. To modify this, open the NT</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; services applet, highlight
your service and press startup. A popup window</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; is opened and you will
be able to customize the service to your</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; satisfaction.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Modify</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; the classpath. The classpath
is determined by the wrapper.class_path</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; properties, to modify
it just add/remove/modify wrapper.class_path lines.</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; The complete classpath
is calculated by concatenating all the</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; wrapper.class_path lines
and putting &amp;quot;;&amp;quot; between them.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Execute</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; several Tomcat instances.
Say that you want one Tomcat to run for</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; &amp;quot;production&amp;quot;
and one for development, you can do that. All you</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; will need to do is to
install the Tomcat service twice and under two</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; different names (and
with different wrapper.properties file and server.xml</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; files). &lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Make</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sure that
the AJPV12 and HTTP connectors are modified in each server.xml</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file to prevent
a clash.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp; &lt;li&gt;Make</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sure to update
the wrapper.shutdown_port property in wrapper.properties</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to point to
the correct AJPV12 shutdown ports (default is 8007). &lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;/ul&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&lt;li&gt;Modify</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; the command line used
to start Tomcat. The Tomcat service is taking all</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; it's command line configuration
from wrapper.properties! To customize the</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; command line, edit the
property wrapper.cmd_line and make sure that it</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; makes a legal Java command
line.&lt;/li&gt;</FONT>
<BR><FONT SIZE=2>&lt;/ol&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;h1&gt;Feedback&lt;/h1&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;p&gt;Please send feedback, bug report or any additional
information to</FONT>
<BR><FONT SIZE=2>&lt;tt&gt;&amp;lt;&lt;a href=&quot;<A
HREF="mailto:tomcat-user@jakarta.apache.org">mailto:tomcat-user@jakarta.apache.org</A>&quot;&gt;tomcat-user@jakarta.apache.org&lt;/a&gt;&amp;gt;</FONT>
<BR><FONT SIZE=2>&lt;/tt&gt;</FONT>
<BR><FONT SIZE=2>&lt;/p&gt;</FONT>
<BR><FONT SIZE=2>&lt;/body&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;/html&gt;</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>__________________________________________________</FONT>
<BR><FONT SIZE=2>Do You Yahoo!?</FONT>
<BR><FONT SIZE=2>Kick off your party with Yahoo! Invites.</FONT>
<BR><FONT SIZE=2><A HREF="http://invites.yahoo.com/" TARGET="_blank">http://invites.yahoo.com/</A></FONT>
</P>

</BODY>
</HTML>

Mime
View raw message