首頁 > 系統設定 > 如何調整Windows上的Tomcat服務參數

如何調整Windows上的Tomcat服務參數

2009年5月9日 發表評論 閱讀評論

如果要調整安裝在Windows 上Tomcat服務的參數可以在console mode執行以下指令即可進行更改啟動參數

C:\> tomcat6 //US//Tomcat6 –Description=”Apache Tomcat Server – http://tomcat.apache.org/ ” \
C:\> –Startup=auto –Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar \
C:\> –JvmMx=512

重點在於使用 //US// (Update service parameters)  指令進行更新參數作業,可使用詳細參數如下:

ParameterName Default Description
–Description Service name description (maximum 1024 characters)
–DisplayName ServiceName Service display name
–Install procrun.exe //RS//ServiceName Install image
–Startup manual Service startup mode can be either auto or manual
–DependsOn List of services that this service depend on. Dependent services are separated using either # or ; characters
–Environment List of environment variables that will be provided to the service in the form key=value. They are separated using either # or ; characters
–User User 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.
–Password Password for user account set by –User parameter
–JavaHome JAVA_HOME Set a different JAVA_HOME then defined by JAVA_HOME environment variable
–Jvm auto Use either auto or specify the full path to the jvm.dll. You can use the environment variable expansion here.
–JvmOptions -Xrs List of options in the form of -D or -X that will be passed to the JVM. The options are separated using either # or ; characters.
–Classpath Set the Java classpath
–JvmMs Initial memory pool size in MB
–JvmMx Maximum memory pool size in MB
–JvmSs Thread stack size in KB
–StartImage Executable that will be run.
–StartPath Working path for the start image executable.
–StartClass Class that will be used for startup.
–StartParams List of parameters that will be passed to either StartImage or StartClass. Parameters are separated using either # or ; character.
–StartMethod Main Method name if differs then main
–StartMode executable Can one of jvm java or exe
–StopImage Executable that will be run on Stop service signal.
–StopPath Working path for the stop image executable.
–StopClass Class that will be used on Stop service signal.
–StopParams List of parameters that will be passed to either StopImage or StopClass. Parameters are separated using either # or ; character.
–StopMethod Main Method name if differs then main
–StopMode executable Can one of jvm java or exe
–StopTimeout No Timeout Defines the timeout in seconds that procrun waits for service to exit gracefully.
–LogPath working path Defines the path for logging
–LogPrefix jakarta_service Defines the service log filename
–LogLevel INFO Defines the logging level and can be either error, info, warn or debug
–StdOutput Redirected stdout filename
–StdError Redirected stderr filename

請依版本參考相關文件:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

Be Sociable, Share!
Categories: 系統設定 Tags: , ,
  1. 目前尚無任何的評論。
  1. 目前尚無任何 trackbacks 和 pingbacks。

*