blob: e211f20d7fa93a848230c7d4c3f13356672b7f85 [file] [log] [blame]
Hongqing Liu71898292014-10-15 13:31:32 +08001<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 (6.0.41) - Windows service HOW-TO</title><meta name="author" content="Mladen Turk"><style type="text/css" media="print">
Hongqing Liufd5ee812014-05-10 16:32:51 +08002 .noPrint {display: none;}
3 td#mainBody {width: 100%;}
4 </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="./images/tomcat.gif" align="right" alt="
5 The Apache Tomcat Servlet/JSP Container
Hongqing Liu71898292014-10-15 13:31:32 +08006 " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.41, May 19 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="./images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="index.html">Docs Home</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li></ul><p><strong>User Guide</strong></p><ul><li><a href="introduction.html">1) Introduction</a></li><li><a href="setup.html">2) Setup</a></li><li><a href="appdev/index.html">3) First webapp</a></li><li><a href="deployer-howto.html">4) Deployer</a></li><li><a href="manager-howto.html">5) Manager</a></li><li><a href="realm-howto.html">6) Realms and AAA</a></li><li><a href="security-manager-howto.html">7) Security Manager</a></li><li><a href="jndi-resources-howto.html">8) JNDI Resources</a></li><li><a href="jndi-datasource-examples-howto.html">9) JDBC DataSources</a></li><li><a href="class-loader-howto.html">10) Classloading</a></li><li><a href="jasper-howto.html">11) JSPs</a></li><li><a href="ssl-howto.html">12) SSL</a></li><li><a href="ssi-howto.html">13) SSI</a></li><li><a href="cgi-howto.html">14) CGI</a></li><li><a href="proxy-howto.html">15) Proxy Support</a></li><li><a href="mbeans-descriptor-howto.html">16) MBean Descriptor</a></li><li><a href="default-servlet.html">17) Default Servlet</a></li><li><a href="cluster-howto.html">18) Clustering</a></li><li><a href="balancer-howto.html">19) Load Balancer</a></li><li><a href="connectors.html">20) Connectors</a></li><li><a href="monitoring.html">21) Monitoring and Management</a></li><li><a href="logging.html">22) Logging</a></li><li><a href="apr.html">23) APR/Native</a></li><li><a href="virtual-hosting-howto.html">24) Virtual Hosting</a></li><li><a href="aio.html">25) Advanced IO</a></li><li><a href="extras.html">26) Additional Components</a></li><li><a href="maven-jars.html">27) Mavenized</a></li></ul><p><strong>Reference</strong></p><ul><li><a href="RELEASE-NOTES.txt">Release Notes</a></li><li><a href="config/index.html">Configuration</a></li><li><a href="api/index.html">Javadocs</a></li><li><a href="http://tomcat.apache.org/connectors-doc/">JK 1.2 Documentation</a></li></ul><p><strong>Apache Tomcat Development</strong></p><ul><li><a href="building.html">Building</a></li><li><a href="changelog.html">Changelog</a></li><li><a href="http://wiki.apache.org/tomcat/TomcatVersions">Status</a></li><li><a href="developers.html">Developers</a></li><li><a href="architecture/index.html">Architecture</a></li><li><a href="funcspecs/index.html">Functional Specs.</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Apache Tomcat 6.0</h1><h2>Windows service HOW-TO</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
Hongqing Liufd5ee812014-05-10 16:32:51 +08007<ul><li><a href="#Tomcat6_service_application">Tomcat6 service application</a></li><li><a href="#Tomcat6w_monitor_application">Tomcat6w monitor application</a></li><li><a href="#Command_line_arguments">Command line arguments</a></li><li><a href="#Command_line_parameters">Command line parameters</a></li><li><a href="#Installing_services">Installing services</a></li><li><a href="#Updating_services">Updating services</a></li><li><a href="#Removing_services">Removing services</a></li><li><a href="#Debugging_services">Debugging services</a></li></ul>
8</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Tomcat6 service application"><!--()--></a><a name="Tomcat6_service_application"><strong>Tomcat6 service application</strong></a></font></td></tr><tr><td><blockquote>
9<p>
10 <b>Tomcat6</b> is a service application for running Tomcat6 as NT service.
11</p>
12</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Tomcat6w monitor application"><!--()--></a><a name="Tomcat6w_monitor_application"><strong>Tomcat6w monitor application</strong></a></font></td></tr><tr><td><blockquote>
13<p>
14 <b>Tomcat6w</b> is a GUI application for monitoring and configuring Tomcat
15 services.
16</p>
17 <p>The available command line options are:</p>
18<p>
19 <table>
20 <tr><th>//ES//</th>
21 <td>Edit service configuration</td>
22 <td>This is the default operation. It is called if the no option is
23 provided but the executable is renamed to <b>servicenameW.exe</b></td>
24 </tr>
25 <tr><th>//MS//</th>
26 <td>Monitor service</td>
27 <td>Put the icon in the system tray</td>
28 </tr>
29 </table>
30</p>
31</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Command line arguments"><!--()--></a><a name="Command_line_arguments"><strong>Command line arguments</strong></a></font></td></tr><tr><td><blockquote>
32<p>
33 Each command line directive is in the form of <b>//XX//ServiceName</b>
34</p>
35 <p>The available command line options are:</p>
36<p>
37 <table>
38 <tr><th>//TS//</th>
39 <td>Run the service as console application</td>
40 <td>This is the default operation. It is called if the no option is
41 provided. The ServiceName is the name of the executable without
42 exe suffix, meaning Tomcat6</td>
43 </tr>
44 <tr><th>//RS//</th>
45 <td>Run the service</td>
46 <td>Called only from ServiceManager</td>
47 </tr>
48 <tr><th>//SS//</th>
49 <td>Stop the service</td>
50 <td></td>
51 </tr>
52 <tr><th>//US//</th>
53 <td>Update service parameters</td>
54 <td></td>
55 </tr>
56 <tr><th>//IS//</th>
57 <td>Install service</td>
58 <td></td>
59 </tr>
60 <tr><th>//DS//</th>
61 <td>Delete service</td>
62 <td>Stops the service if running</td>
63 </tr>
64 </table>
65</p>
66</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Command line parameters"><!--()--></a><a name="Command_line_parameters"><strong>Command line parameters</strong></a></font></td></tr><tr><td><blockquote>
67<p>
68 Each command parameter is prefixed with <b>--</b>.
69 If the command line is prefixed with <b>++</b> then it's value will
70 be appended to the existing option.
71 If the environment variable with the same name as command line parameter but
72 prefixed with <code>PR_</code> exists it will take precedence.
73 For example:
74<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>set PR_CLASSPATH=xx.jar</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
75</p>
76<p>is equivalent to providing
77<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>--Classpath=xx.jar</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
78</p>
79<p> as command line parameter.</p>
80<p>
81 <table>
82 <tr>
83 <th>ParameterName</th>
84 <th>Default</th>
85 <th>Description</th>
86 </tr>
87 <tr>
88 <td>--Description</td>
89 <td></td>
90 <td>Service name description (maximum 1024 characters)</td>
91 </tr>
92 <tr>
93 <td>--DisplayName</td>
94 <td>ServiceName</td>
95 <td>Service display name</td>
96 </tr>
97 <tr>
98 <td>--Install</td>
99 <td>procrun.exe //RS//ServiceName</td>
100 <td>Install image</td>
101 </tr>
102 <tr>
103 <td>--Startup</td>
104 <td>manual</td>
105 <td>Service startup mode can be either <b>auto</b> or <b>manual</b></td>
106 </tr>
107 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800108 <td>++DependsOn</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800109 <td></td>
110 <td>List of services that this service depend on. Dependent services
111 are separated using either <b>#</b> or <b>;</b> characters</td>
112 </tr>
113 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800114 <td>++Environment</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800115 <td></td>
116 <td>List of environment variables that will be provided to the service
117 in the form <b>key=value</b>. They are separated using either
118 <b>#</b> or <b>;</b> characters. If you need to use either the <b>#</b>
119 or <b>;</b> character within a value then the entire value must be
120 enclosed inside single quotes.</td>
121 </tr>
122 <tr>
123 <td>--User</td>
124 <td></td>
125 <td>User account used for running executable. It is used only for
126 StartMode <b>java</b> or <b>exe</b> and enables running applications
127 as service under account without LogonAsService privilege.</td>
128 </tr>
129 <tr>
130 <td>--Password</td>
131 <td></td>
132 <td>Password for user account set by --User parameter</td>
133 </tr>
134 <tr>
135 <td>--JavaHome</td>
136 <td>JAVA_HOME</td>
137 <td>Set a different JAVA_HOME than defined by JAVA_HOME environment
138 variable</td>
139 </tr>
140 <tr>
141 <td>--Jvm</td>
142 <td>auto</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800143 <td>Use either <b>auto</b> (i.e. find the JVM from the Windows registry)
144 or specify the full path to the <b>jvm.dll</b>.
Hongqing Liufd5ee812014-05-10 16:32:51 +0800145 You can use the environment variable expansion here.</td>
146 </tr>
147 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800148 <td>++JvmOptions</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800149 <td>-Xrs</td>
150 <td>List of options in the form of <b>-D</b> or <b>-X</b> that will be
151 passed to the JVM. The options are separated using either
Hongqing Liu71898292014-10-15 13:31:32 +0800152 <b>#</b> or <b>;</b> characters. (Not used in <b>exe</b> mode.)</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800153 </tr>
154 <tr>
155 <td>--Classpath</td>
156 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800157 <td>Set the Java classpath. (Not used in <b>exe</b> mode.)</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800158 </tr>
159 <tr>
160 <td>--JvmMs</td>
161 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800162 <td>Initial memory pool size in MB. (Not used in <b>exe</b> mode.)</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800163 </tr>
164 <tr>
165 <td>--JvmMx</td>
166 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800167 <td>Maximum memory pool size in MB. (Not used in <b>exe</b> mode.)</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800168 </tr>
169 <tr>
170 <td>--JvmSs</td>
171 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800172 <td>Thread stack size in KB. (Not used in <b>exe</b> mode.)</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800173 </tr>
174 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800175 <td>--StartMode</td>
176 <td></td>
177 <td>One of <b>jvm</b>, <b>Java</b> or <b>exe</b>. The modes are:
178 <ul>
179 <li>jvm - start Java in-process. Depends on jvm.dll, see <b>--Jvm</b>.</li>
180 <li>Java - same as exe, but automatically uses the default Java
181 executable, i.e. %JAVA_HOME%\bin\java.exe. Make sure JAVA_HOME is set
182 correctly, or use --JavaHome to provide the correct location.
183 If neither is set, procrun will try to find the default JDK (not JRE)
184 from the Windows registry.</li>
185 <li>exe - run the image as a separate process</li>
186 </ul>
187 </td>
188 </tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800189 <tr>
190 <td>--StartImage</td>
191 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800192 <td>Executable that will be run. Only applies to <b>exe</b> mode.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800193 </tr>
194 <tr>
195 <td>--StartPath</td>
196 <td></td>
197 <td>Working path for the start image executable.</td>
198 </tr>
199 <tr>
200 <td>--StartClass</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800201 <td>Main</td>
202 <td>Class that contains the startup method. Applies to the <b>jvm</b> and
203 <b>Java</b> modes. (Not used in <b>exe</b> mode.) </td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800204 </tr>
205 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800206 <td>--StartMethod</td>
207 <td>main</td>
208 <td>Method name if differs then main</td>
209 </tr>
210 <tr>
211 <td>++StartParams</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800212 <td></td>
213 <td>List of parameters that will be passed to either StartImage or
214 StartClass. Parameters are separated using either <b>#</b> or
215 <b>;</b> character.</td>
216 </tr>
217 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800218 <td>--StopMode</td>
219 <td></td>
220 <td>One of <b>jvm</b>, <b>Java</b> or <b>exe</b>. See <b>--StartMode</b>
221 for further details. </td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800222 </tr>
223 <tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800224 <td>--StopImage</td>
225 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800226 <td>Executable that will be run on Stop service signal. Only applies to
227 <b>exe</b> mode.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800228 </tr>
229 <tr>
230 <td>--StopPath</td>
231 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800232 <td>Working path for the stop image executable. Does not apply to <b>jvm</b>
233 mode.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800234 </tr>
235 <tr>
236 <td>--StopClass</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800237 <td>Main</td>
238 <td>Class that will be used on Stop service signal. Applies to the
239 <b>jvm</b> and <b>Java</b> modes. </td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800240 </tr>
241 <tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800242 <td>--StopMethod</td>
243 <td>main</td>
244 <td>Method name if differs then main</td>
245 </tr>
246 <tr>
247 <td>++StopParams</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800248 <td></td>
249 <td>List of parameters that will be passed to either StopImage or
250 StopClass. Parameters are separated using either <b>#</b> or
251 <b>;</b> character.</td>
252 </tr>
253 <tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800254 <td>--StopTimeout</td>
255 <td>No Timeout</td>
256 <td>Defines the timeout in seconds that procrun waits for service to
257 exit gracefully.</td>
258 </tr>
259 <tr>
260 <td>--LogPath</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800261 <td>%SystemRoot%\System32\LogFiles\Apache</td>
262 <td>Defines the path for logging. Creates the directory if necessary.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800263 </tr>
264 <tr>
265 <td>--LogPrefix</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800266 <td>commons-daemon</td>
267 <td>Defines the service log filename prefix. The log file is created in the
268 LogPath directory with <code>.YEAR-MONTH-DAY.log</code> suffix</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800269 </tr>
270 <tr>
271 <td>--LogLevel</td>
Hongqing Liu71898292014-10-15 13:31:32 +0800272 <td>Info</td>
273 <td>Defines the logging level and can be either <b>Error</b>,
274 <b>Info</b>, <b>Warn</b> or <b>Debug</b>. (Case insensitive).</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800275 </tr>
276 <tr>
277 <td>--StdOutput</td>
278 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800279 <td>Redirected stdout filename.
280 If named <b>auto</b> then file is created inside <b>LogPath</b> with the
281 name <b>service-stdout.YEAR-MONTH-DAY.log</b>.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800282 </tr>
283 <tr>
284 <td>--StdError</td>
285 <td></td>
Hongqing Liu71898292014-10-15 13:31:32 +0800286 <td>Redirected stderr filename.
287 If named <b>auto</b> then file is created inside <b>LogPath</b> with the
288 name <b>service-stderr.YEAR-MONTH-DAY.log</b>.</td>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800289 </tr>
Hongqing Liu71898292014-10-15 13:31:32 +0800290 <tr>
291 <td>--PidFile</td>
292 <td></td>
293 <td>Defines the file name for storing the running process id. Actual file is
294 created in the <b>LogPath</b> directory</td>
295 </tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800296 </table>
297</p>
298</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Installing services"><!--()--></a><a name="Installing_services"><strong>Installing services</strong></a></font></td></tr><tr><td><blockquote>
299<p>
300The safest way to manually install the service is to use the provided
301<b>service.bat</b> script. Administrator privileges are required to run this
302script.
303</p>
304<p>
Hongqing Liu71898292014-10-15 13:31:32 +0800305<strong>NOTE:</strong> On Windows Vista or any later operating system with User
306Account Control (UAC) enabled you will be asked for additional privileges
307when 'Tomcat6.exe' is launched by the script.<br>
308If you want to pass additional options to service installer as
309<code>PR_*</code> environment variables, you have to either configure them
310globally in OS, or launch the program that sets them with elevated privileges
311(e.g. right-click on cmd.exe and select "Run as administrator"; on Windows 8
312(or later) or Windows Server 2012 (or later), you can open an elevated command
313prompt for the current directory from the Explorer
314by clicking on the "File" menu bar). See issue <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=56143">56143</a> for details.
Hongqing Liufd5ee812014-05-10 16:32:51 +0800315</p>
316<p>
317<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
318Install the service named 'Tomcat6'
319C:\&gt; service.bat install
320</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
321</p>
322<p>
323If using tomcat6.exe, you need to use the <b>//IS//</b> parameter.
324</p>
325<p>
326<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
327Install the service named 'Tomcat6'
328C:\&gt; tomcat6 //IS//Tomcat6 --DisplayName="Apache Tomcat 6" \
329C:\&gt; --Install="C:\Program Files\Tomcat\bin\tomcat6.exe" --Jvm=auto \
330C:\&gt; --StartMode=jvm --StopMode=jvm \
331C:\&gt; --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \
332C:\&gt; --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
333</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
334</p>
335</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Updating services"><!--()--></a><a name="Updating_services"><strong>Updating services</strong></a></font></td></tr><tr><td><blockquote>
336<p>
337To update the service parameters, you need to use the <b>//US//</b> parameter.
338</p>
339<p>
340<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
341Update the service named 'Tomcat6
342C:\&gt; tomcat6 //US//Tomcat6 --Description="Apache Tomcat Server - http://tomcat.apache.org/ " \
343C:\&gt; --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar
344</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
345</p>
346</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Removing services"><!--()--></a><a name="Removing_services"><strong>Removing services</strong></a></font></td></tr><tr><td><blockquote>
347<p>
348To remove the service, you need to use the <b>//DS//</b> parameter.<br>
349If the service is running it will be stopped and then deleted.
350</p>
351<p>
352<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
353Remove the service named 'Tomcat6'
354C:\&gt; tomcat6 //DS//Tomcat6
355</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
356</p>
357</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Debugging services"><!--()--></a><a name="Debugging_services"><strong>Debugging services</strong></a></font></td></tr><tr><td><blockquote>
358<p>
359To run the service in console mode, you need to use the <b>//TS//</b> parameter.
360The service shutdown can be initiated by pressing <b>CTRL+C</b> or
361<b>CTRL+BREAK</b>.
362If you rename the tomcat6.exe to testservice.exe then you can just execute the
363testservice.exe and this command mode will be executed by default.
364</p>
365<p>
366<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
367Run the service named 'Tomcat6' in console mode
368C:\&gt; tomcat6 //TS//Tomcat6 [additional arguments]
369Or simply execute:
370C:\&gt; tomcat6
371</pre></td><td bgcolor="#023264" width="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="./images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
372</p>
373</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
374 Copyright &copy; 1999-2014, Apache Software Foundation
375 </em></font></div></td></tr></table></body></html>