


版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、本人多次碰到這個問題,在網上搜索很久,一直沒有找到真正的解決方 法。今天下午一次偶然的機會發現了問題所在,根據問題,提出以下解決方 案。問題所在:現在很多人都在使用 jdk 的壓縮版,使得 tomcat 服務不能正確設置 java VM,導致tomcat服務不能正常配置和啟動。如果你是安裝版jdk也出現啟動問題,請參照以下方法解決。假設jdk 安裝目錄為 d:j2sdktomcat5 安裝目錄為 D:Program FilesApache Software FoundationTomcat5.01. 配置環境變量:JAVA_HOME = d:j2sdkCLASSPATH= %JAVA_HOME
2、%bin;.;%JAVA_HOME%lib;%JAVA_HOME%libdt.jar;%JAVA_H OME%libtools.jarCATALINA_HOME = D:Program FilesApache Software FoundationTomcat 5.02. 配置Tomcat服務這里有兩種情況,一是 tomcat5 為安裝版,二是解壓版,針對這兩種情況 分別解決。( 1)安裝版 tomcat5在安裝時選擇安裝 tomcat 服務,如圖安裝完成后,打開注冊表regedit.exe,找到HKEY_LOCAL_MACHINESOFTWAREApache Software Foundat
3、ionTomcat ServiceManager'Tomcat5Parameters,你可以看到里面有很多參數值,主要是修 改Java項的值為d:j2sdkjrebinserverjvm.dll,修改正確后,你就可以通過開始 ->程序->Apache Tomcat 5.0->start tomcat啟動服務了。若沒有若沒有此項,可以 依照以下方法設置參數。( 2)解壓版 tomcat5這時你要先配置服務所用的參數,啟動命令是 tomcat5 的 bin 目錄下的 tomcatw.exe(后面附上 tomcatw.exe 命令參數)。如果不存在 HKEY_LOCAL_M
4、ACHINESOFTWAREApache SoftwareFoun dati on TomcatServiceMa nagerTomcat5Parameters,請先倉 U建,這一步 是關鍵。使用命令 tomcatw.exe /ES/Tomcat5 打開配置窗口,如下設置參數如下:Service 欄Description = Apache Tomcat 5.0(這個可以隨便寫)Image Path = d:Program FilesApache Software FoundationTomcat5.0binbootstrap.jarWork Path = d:Program FilesApac
5、he Software FoundationTomcat 5.0AutoStart 這個參數允許設置服務為自動啟動Java VM 欄:Auto 不要打勾Java VM = D:j2sdkjrebinserverjvm.dllJava Options = -Dcatalina.home="d:Program FilesApache SoftwareFoundationTomcat 5.0"-Djava.endorsed.dirs="d:Program FilesApache SoftwareFoundationTomcat 5.0commonendorsed&quo
6、t; -XrsStart Class = org/apache/catalina/startup/Bootstrap;main;startStop Class = org/apache/catalina/startup/Bootstrap;main;stopStandard Streams:只要設置兩項Output = d:Program FilesApache Software FoundationTomcat5.0logsstdout.logError = d:Program FilesApache Software FoundationTomcat5.0logsstderr.log根據以
7、上設置,接下來可以使用 tomcatw.exe /GT/Tomcat5 啟動服務了。 若有問題可以給我留言或者加我 QQ: 4034348T0MCAT5在 WINDOWS下的一些命令行Tomcatw monitor applicationTomcatwis a GUI application for monitoring and configuring Tomcatservices.The available command line options are:Edit service/ES/configurationThis is the default operation. It is ca
8、lled ifthe no option is provided but the executable isrenamed toservicenameW.exe/MS/Monitor servicePut the icon in the system tryCommand line argumentsEach command line directive is in the form of/XX/ServiceNameThe available command line options are:This is the default operation. It is called ifRunt
9、heserviceasthenooptionisprovided.TheServiceNameisthe/TS/consolename of the executable without exe sufix,applicationmeaning Tomcat5/RS/Run the serviceCalled only from ServiceManager/SS/Stop the serviceUpdate service/US/parameters/IS/Install service/DS/Delete serviceStops the service if runningCommand
10、 line parametersEachcommandparameterisprefixedwith- -.Ifthecommandlineisprefixedwith+then it's value will be appended to the existing option. If theenvironment variable with the same name as command line parameter butprefixed withPR_exists it will take precedence. For example:set PR_CLASSPATH=xx
11、.jaris equivalent to providing-Classpath=xx.jaras command line parameter.ParameterNameDefault-Description-DisplayNameServiceName-Installprocrun.exe/RS/ServiceName-Startupmanual-DependsOn-Environment-User-Password-JavaHomeJAVA_HOME-JvmautoDescriptionServicenamedescription(maximum1024characters)Servic
12、e display nameInstall imageServicestartupmodecanbeeitherautoormanualList of services that this servicedepend on. Dependent services areseparated using either#or;charactersList of environment variables thatwillbeprovidedtotheserviceintheformkey=value. They are separatedusing either#or;charactersUser
13、account used for runningexecutable. It is used only forStartModejavaorexeand enablesrunning applications as service underaccount without LogonAsServiceprivilege.Passwordforuseraccountsetby-UserparameterSetadifferentJAVA_HOMEthendefinedby JAVA_HOME environment variableUse eitherautoor specify the ful
14、lpath to thejvm.dll. You can use theenvironment variable expansion here.-JvmOptions-Xrs-Classpath-JvmMs-JvmMx-JvmSs-StartImage-StartPath-StartClass-StartParams-StartMethodMain-StartModeexecutable-StopImage-StopPath-StopClass-StopParams-StopMethodMain-StopModeexecutable-StopTimeoutNo Timeout-LogPathw
15、orking path-LogPrefixjakarta_service-LogLevelINFO-StdOutput-StdErrorListofoptionsintheformof-Dor-Xthat will be passed to the JVM. Theoptions are separated using either#or;characters.Set the Java classpathInitial memory pool size in MBMaximum memory pool size in MBThread stack size in KBExecutable th
16、at will be run.Working path for the start imageexecutable.Class that will be used for startup.Listofparametersthatwillbepassedto either StartImage or StartClass.Parameters are separated using either#or;character.Method name if differs then mainCan one ofjvmjavaorexeExecutable that will be run on Sto
17、pservice signal.Working path for the stop imageexecutable.ClassthatwillbeusedonStopservicesignal.Listofparametersthatwillbepassedto either StopImage or StopClass.Parameters are separated using either#or;character.Method name if differs then mainCan one ofjvmjavaorexeDefines the timeout in seconds th
18、atprocrun waits for service to exitgracefully.Defines the path for loggingDefines the service log filenameDefines the logging level and can beeithererror,info,warnordebugRedirected stdout filenameRedirected stderr filenameInstalling servicesThe safest way to manually install the service is to use th
19、e providedservice.batscript.Install the service named 'Tomcat5'C:> service.bat installIf using tomcat.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
20、Tomcatbintomcat5.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=stopUpdating servicesTo update the service parameters, you need to use the/US/parame
21、ter.Update the service named 'Tomcat5C:> tomcat /US/Tomcat5 -Description="Apache Tomcat Server - /tomcat " C:> -Startup=autoClasspath=%JAVA_HOME%libtools.jar;%CATALINA_HOME%binbootstrap.jarRemoving servicesTo 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:> tomcat /DS/Tomcat5Debugging servicesToruntheserviceinconsolemode,youneedtousethe/TS/parameter.Theservicesh utdowncanbeinitiatedbypressingCTRL+CorCTRL+BRE
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 母親節活動計劃幼兒園2025年簡單(16篇)
- 2024年涼山州會理市全市考調市級事業單位人員筆試真題
- 宿舍網絡設備管理制度
- 起重機門市復習測試題
- 軟件測試工程師經驗與建議試題及答案
- 二手房購房合同范本(18篇)
- 簡易采購合同范本(17篇)
- 醫學影像技術操作規范及案例分析試題集
- 數據庫綜合評估試題及答案詳解
- 護理學生物試題及答案
- 杠桿臂鉆孔鉆床夾具設計
- 員工工資條模板
- 云南省楚雄州2023年六年級數學第二學期期末達標測試試題含解析
- 2023-2024人教版小學5五年級數學下冊(全冊)教案
- 交付經理工作職責
- 國際檔案日宣傳教育課件(帶內容)
- 基于PLC的藥房取藥系統設計
- 安徽省汽車維修行業車輛維修合同
- GB/T 16447-2004煙草及煙草制品調節和測試的大氣環境
- 公司勞務派遣人員工資薪酬發放暫行規定
- 建筑大師伊東豐雄簡介及作品集課件
評論
0/150
提交評論