There are a lot of options that make the command
tomcat.exe very inconvenient to handle.
-install Service_name
Path_to_Server_JVM
-Dcatalina.home Path to the installation directory of Tomcat.
Here are all the
classes needed to run the server.
-Dcatalina.base Path to the web
application directory. This is the directory of
the deployed web application.
-Djava.endorsed.dirs Path to endorsed resources:
xercesImpl.jar, xmlParserAPI.jar
These come with the Tomcat installation.
-Djava.class.path Path to the Bootstrap.jar needed for
starting the service.
-start Start class, method and parameters to start the
service.
-stop Stop class, method and parameters to stop the
service.
-out Path to output log file.
-err Path to error log file.
This is a sample to create a Tomcat NT service.
C:\Tomcat4\bin tomcat -install Tomcat_Instance_2
D:\DEV\j2sdk14103\jre\bin\server\jvm.dl
-Dcatalina.home=D:\server\ApacheGroup\Tomcat4
-Dcatalina.base=D:\server\tomcat-instances\instance2
-Djava.endorsed.dirs=D:\server\ApacheGroup\Tomcat4\common\endorsed
-Djava.class.path=D:\server\ApacheGroup\Tomcat4\bin\bootstrap.jar
-Xrs -Xms64m -Xss1024k -Xmx256m
-start org.apache.catalina.startup.BootstrapService -method main
-params start
-stop org.apache.catalina.startup.BootstrapService -method main
-params stop
-out
D:\server\tomcat-instances\instance1\logs\Tomcat_Instance_2_out.log
-err D:\server\to
mcat-instances\instance1\logs\Tomcat_Instance_2_err.log
This is all in ONE line so that the tomcat command can
parse all options.
As you can see, this is very hard to handle even if you want to
create more than one
service.
|