版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、本人多次碰到這個(gè)問題,在網(wǎng)上搜索很久,一直沒有找到真正的解決方 法。今天下午一次偶然的機(jī)會(huì)發(fā)現(xiàn)了問題所在,根據(jù)問題,提出以下解決方 案。問題所在:現(xiàn)在很多人都在使用 jdk 的壓縮版,使得 tomcat 服務(wù)不能正確設(shè)置 java VM,導(dǎo)致tomcat服務(wù)不能正常配置和啟動(dòng)。如果你是安裝版jdk也出現(xiàn)啟動(dòng)問題,請(qǐng)參照以下方法解決。假設(shè)jdk 安裝目錄為 d:j2sdktomcat5 安裝目錄為 D:Program FilesApache Software FoundationTomcat5.01. 配置環(huán)境變量: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服務(wù)這里有兩種情況,一是 tomcat5 為安裝版,二是解壓版,針對(duì)這兩種情況 分別解決。( 1)安裝版 tomcat5在安裝時(shí)選擇安裝 tomcat 服務(wù),如圖安裝完成后,打開注冊(cè)表regedit.exe,找到HKEY_LOCAL_MACHINESOFTWAREApache Software Foundat
3、ionTomcat ServiceManager'Tomcat5Parameters,你可以看到里面有很多參數(shù)值,主要是修 改Java項(xiàng)的值為d:j2sdkjrebinserverjvm.dll,修改正確后,你就可以通過開始 ->程序->Apache Tomcat 5.0->start tomcat啟動(dòng)服務(wù)了。若沒有若沒有此項(xiàng),可以 依照以下方法設(shè)置參數(shù)。( 2)解壓版 tomcat5這時(shí)你要先配置服務(wù)所用的參數(shù),啟動(dòng)命令是 tomcat5 的 bin 目錄下的 tomcatw.exe(后面附上 tomcatw.exe 命令參數(shù))。如果不存在 HKEY_LOCAL_M
4、ACHINESOFTWAREApache SoftwareFoun dati on TomcatServiceMa nagerTomcat5Parameters,請(qǐng)先倉(cāng) U建,這一步 是關(guān)鍵。使用命令 tomcatw.exe /ES/Tomcat5 打開配置窗口,如下設(shè)置參數(shù)如下:Service 欄Description = Apache Tomcat 5.0(這個(gè)可以隨便寫)Image Path = d:Program FilesApache Software FoundationTomcat5.0binbootstrap.jarWork Path = d:Program FilesApac
5、he Software FoundationTomcat 5.0AutoStart 這個(gè)參數(shù)允許設(shè)置服務(wù)為自動(dòng)啟動(dòng)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:只要設(shè)置兩項(xiàng)Output = d:Program FilesApache Software FoundationTomcat5.0logsstdout.logError = d:Program FilesApache Software FoundationTomcat5.0logsstderr.log根據(jù)以
7、上設(shè)置,接下來可以使用 tomcatw.exe /GT/Tomcat5 啟動(dòng)服務(wù)了。 若有問題可以給我留言或者加我 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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二級(jí)建造師考試重點(diǎn)公路(實(shí)務(wù))
- 四年級(jí)數(shù)學(xué)(簡(jiǎn)便運(yùn)算)計(jì)算題專項(xiàng)練習(xí)與答案
- 終止推廣合作協(xié)議書(2篇)
- 六年級(jí)上冊(cè)《比的意義》說課稿9篇
- 南京航空航天大學(xué)《材料工程基礎(chǔ)》2022-2023學(xué)年第一學(xué)期期末試卷
- 南京工業(yè)大學(xué)浦江學(xué)院《數(shù)據(jù)結(jié)構(gòu)》2021-2022學(xué)年期末試卷
- 某供電公司綜合工區(qū)門衛(wèi)施工組織設(shè)計(jì)
- 南京工業(yè)大學(xué)浦江學(xué)院《酒店人力資源管理》2023-2024學(xué)年第一學(xué)期期末試卷
- 《小雨沙沙》說課稿
- 租聘挖機(jī)合同(2篇)
- 電力電纜基礎(chǔ)知識(shí)課件
- 情緒智力量表EIS
- 《 民航服務(wù)心理學(xué)》考試題及參考答案
- 全國(guó)文明單位測(cè)評(píng)體系(2020年版)
- 分光光度計(jì)使用
- 2021學(xué)堂在線網(wǎng)課《生活英語讀寫》課后作業(yè)單元考核答案
- 三級(jí)公立醫(yī)院績(jī)效考核工作解讀(行業(yè)專家培訓(xùn)課件)
- 走進(jìn)葉子世界(DOC)
- 世界歷史第一冊(cè)全部教案
- 機(jī)動(dòng)車循環(huán)利用科技產(chǎn)業(yè)園項(xiàng)目環(huán)境影響報(bào)告表
- 作文安排詳略的技巧-PPT課件
評(píng)論
0/150
提交評(píng)論