TOMCAT5在WINDOWS下的一些命令行

Tomcat5w monitor application

Tomcat5w is a GUI application for monitoring and configuring Tomcat services.

The available command line options are:

//ES//Edit service configurationThis is the default operation. It is called if the no option is provided but the executable is renamed to servicenameW.exe
//MS//Monitor servicePut the icon in the system try

Command line arguments

Each command line directive is in the form of //XX//ServiceName

The available command line options are:

//TS//Run the service as console applicationThis is the default operation. It is called if the no option is provided. The ServiceName is the name of the executable without exe sufix, meaning Tomcat5
//RS//Run the serviceCalled only from ServiceManager
//SS//Stop the service
//US//Update service parameters
//IS//Install service
//DS//Delete serviceStops the service if running

Command line parameters

Each command parameter is prefixed with --. If the command line is prefixed with ++ then it's value will be appended to the existing option. If the environment variable with the same name as command line parameter but prefixed with PR_ exists it will take precedence. For example:

set PR_CLASSPATH=xx.jar

is equivalent to providing

--Classpath=xx.jar

as command line parameter.

ParameterNameDefaultDescription
--DescriptionService name description (maximum 1024 characters)
--DisplayNameServiceNameService display name
--Installprocrun.exe //RS//ServiceNameInstall image
--StartupmanualService startup mode can be either auto or manual
--DependsOnList of services that this service depend on. Dependent services are separated using either # or ; characters
--EnvironmentList of environment variables that will be provided to the service in the form key=value. They are separated using either # or ; characters
--UserUser account used for running executable. It is used only for StartMode java or exe and enables running applications as service under account without LogonAsService privilege.
--PasswordPassword for user account set by --User parameter
--JavaHomeJAVA_HOMESet a different JAVA_HOME then defined by JAVA_HOME environment variable
--JvmautoUse either auto or specify the full path to the jvm.dll. You can use the environment variable expansion here.
--JvmOptions-XrsList of options in the form of -D or -X that will be passed to the JVM. The options are separated using either # or ; characters.
--ClasspathSet the Java classpath
--JvmMsInitial memory pool size in MB
--JvmMxMaximum memory pool size in MB
--JvmSsThread stack size in KB
--StartImageExecutable that will be run.
--StartPathWorking path for the start image executable.
--StartClassClass that will be used for startup.
--StartParamsList of parameters that will be passed to either StartImage or StartClass. Parameters are separated using either # or ; character.
--StartMethodMainMethod name if differs then main
--StartModeexecutableCan one of jvm java or exe
--StopImageExecutable that will be run on Stop service signal.
--StopPathWorking path for the stop image executable.
--StopClassClass that will be used on Stop service signal.
--StopParamsList of parameters that will be passed to either StopImage or StopClass. Parameters are separated using either # or ; character.
--StopMethodMainMethod name if differs then main
--StopModeexecutableCan one of jvm java or exe
--StopTimeoutNo TimeoutDefines the timeout in seconds that procrun waits for service to exit gracefully.
--LogPathworking pathDefines the path for logging
--LogPrefixjakarta_serviceDefines the service log filename
--LogLevelINFODefines the logging level and can be either error, info, warn or debug
--StdOutputRedirected stdout filename
--StdErrorRedirected stderr filename

Installing services

The safest way to manually install the service is to use the provided service.bat script.

Install the service named 'Tomcat5'
C:/> service.bat install

If using tomcat5.exe, you need to use the //IS// parameter.

Install the service named 'Tomcat5'
C:/> tomcat5 //IS//Tomcat5 --DisplayName="Apache Tomcat 5" /
C:/> --Install="C:/Program Files/Tomcat/bin/tomcat5.exe" --Jvm=auto /
C:/> --StartMode=jvm --StopMode=jvm /
C:/> --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start /
C:/> --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
Updating services

To update the service parameters, you need to use the //US// parameter.

Update the service named 'Tomcat5
C:/> tomcat5 //US//Tomcat5 --Description="Apache Tomcat Server - http://jakarta.apache.org/tomcat " /
C:/> --Startup=auto --Classpath=%JAVA_HOME%/lib/tools.jar;%CATALINA_HOME%/bin/bootstrap.jar
Removing services

To remove the service, you need to use the //DS// parameter.
If the service is running it will be stopped and then deleted.

Remove the service named 'Tomcat5'
C:/> tomcat5 //DS//Tomcat5
Debugging services
To run the service in console mode, you need to use the //TS// parameter. The service shutdown can be initiated by pressing CTRL+C or CTRL+BREAK. If you rename the tomcat5.exe to testservice.exe then you can just execute the testservice.exe and this command mode will be executed by default. 
Run the service named 'Tomcat5' in console mode
C:/> tomcat5 //TS//Tomcat5 [additional arguments]
Or simply execute:
C:/> tomcat5
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值