国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
tomcat注冊成windows服務(wù) | micmiu

在windows系統(tǒng)中tomcat服務(wù)的注冊和刪除,可以運(yùn)用%TOMCAT_HOME%\bin\service.bat 來完成。

注意:目前免安裝版的發(fā)布已經(jīng)區(qū)分平臺(tái)了(Tomcat6.0.24開始和 Tomcat7),需要下載windows平臺(tái)對應(yīng)的壓縮包,否則在bin目錄下沒有:service.bat、tomcatX.exe、tomcatXw.exe 等文件。

注冊服務(wù):

1>service.bat install

刪除服務(wù):

1service.bat remove

也可以通過bin\tomcat6.exe 來對服務(wù)的注冊和刪除:

tomcat6w.exe的命令可選參數(shù):

//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:

//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 suffix, meaning Tomcat6
//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:

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 than 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

注冊名稱為’Tomcat6′的服務(wù)

1Install the service named 'Tomcat6'
2C:\> tomcat6 //IS//Tomcat6 --DisplayName="Apache Tomcat 6" \
3C:\> --Install="C:\Program Files\Tomcat\bin\tomcat6.exe" --Jvm=auto \
4C:\> --StartMode=jvm --StopMode=jvm \
5C:\> --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \
6C:\> --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

更新名稱為’Tomcat6′的服務(wù)信息

1C:\> tomcat6 //US//Tomcat6 --Description="Apache Tomcat Server - \
2C:\> --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar

移除名稱叫’Tomcat6‘的服務(wù)

1C:\> tomcat6 //DS//Tomcat6

詳細(xì)見官網(wǎng):http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

service.bat 的代碼 :

1@echo off
2if "%OS%" == "Windows_NT" setlocal
3rem ---------------------------------------------------------------------------
4rem NT Service Install/Uninstall script
5rem
6rem Options
7rem install                Install the service using Tomcat5 as service name.
8rem                        Service is installed using default settings.
9rem remove                 Remove the service from the System.
10rem
11rem name        (optional) If the second argument is present it is considered
12rem                        to be new service name
13rem
14rem $Id: service.bat 467182 2006-10-23 23:47:06Z markt $
15rem ---------------------------------------------------------------------------
16 
17rem Guess CATALINA_HOME if not defined
18set CURRENT_DIR=%cd%
19if not "%CATALINA_HOME%" == "" goto gotHome
20set CATALINA_HOME=%cd%
21if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome
22rem CD to the upper dir
23cd ..
24set CATALINA_HOME=%cd%
25:gotHome
26if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome
27echo The tomcat.exe was not found...
28echo The CATALINA_HOME environment variable is not defined correctly.
29echo This environment variable is needed to run this program
30goto end
31rem Make sure prerequisite environment variables are set
32if not "%JAVA_HOME%" == "" goto okHome
33echo The JAVA_HOME environment variable is not defined
34echo This environment variable is needed to run this program
35goto end
37if not "%CATALINA_BASE%" == "" goto gotBase
38set CATALINA_BASE=%CATALINA_HOME%
39:gotBase
40 
41set EXECUTABLE=%CATALINA_HOME%\bin\tomcat6.exe
42 
43rem Set default Service name
44set SERVICE_NAME=Tomcat6
45set PR_DISPLAYNAME=Apache Tomcat
46 
47if "%1" == "" goto displayUsage
48if "%2" == "" goto setServiceName
49set SERVICE_NAME=%2
50set PR_DISPLAYNAME=Apache Tomcat %2
51:setServiceName
52if %1 == install goto doInstall
53if %1 == remove goto doRemove
54if %1 == uninstall goto doRemove
55echo Unknown parameter "%1"
56:displayUsage
57echo.
58echo Usage: service.bat install/remove [service_name]
59goto end
60 
61:doRemove
62rem Remove the service
63"%EXECUTABLE%" //DS//%SERVICE_NAME%
64echo The service '%SERVICE_NAME%' has been removed
65goto end
66 
67:doInstall
68rem Install the service
69echo Installing the service '%SERVICE_NAME%' ...
70echo Using CATALINA_HOME:    %CATALINA_HOME%
71echo Using CATALINA_BASE:    %CATALINA_BASE%
72echo Using JAVA_HOME:        %JAVA_HOME%
73 
74rem Use the environment variables as an example
75rem Each command line option is prefixed with PR_
76 
77set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat
78set PR_INSTALL=%EXECUTABLE%
79set PR_LOGPATH=%CATALINA_BASE%\logs
80set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
81rem Set the server jvm from JAVA_HOME
82set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
83if exist "%PR_JVM%" goto foundJvm
84rem Set the client jvm from JAVA_HOME
85set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll
86if exist "%PR_JVM%" goto foundJvm
87set PR_JVM=auto
88:foundJvm
89echo Using JVM:              %PR_JVM%
90"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
91if not errorlevel 1 goto installed
92echo Failed installing '%SERVICE_NAME%' service
93goto end
94:installed
95rem Clear the environment variables. They are not needed any more.
96set PR_DISPLAYNAME=
97set PR_DESCRIPTION=
98set PR_INSTALL=
99set PR_LOGPATH=
100set PR_CLASSPATH=
101set PR_JVM=
102rem Set extra parameters
103"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm
104rem More extra parameters
105set PR_LOGPATH=%CATALINA_BASE%\logs
106set PR_STDOUTPUT=auto
107set PR_STDERROR=auto
108"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256
109echo The service '%SERVICE_NAME%' has been installed.
110 
111:end
112cd %CURRENT_DIR%
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Eclipse遠(yuǎn)程調(diào)試Tomcat
catalina.bat腳本解析
tomcat一閃而過的問題
查看tomcat啟動(dòng)文件都干點(diǎn)啥
TOMCAT內(nèi)存溢出
tomcat啟動(dòng)startup.bat一閃而過
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服