先到 Tomcat 的網站 http://tomcat.apache.org/ 下載的安裝檔 apache-tomcat-7.0.47-windows-x64.zip ,並解壓於 C:\AppServ\apache-tomcat-7.0.47x64 目錄下。因此設定 TOMCAT_HOME="C:\AppServ\apache-tomcat-7.0.47x64",並假設 JDK 的 JAVA_HOME="D:\Progs\jdk1.7.0_45_x64"。

修改下列兩個檔案:

1. C:\AppServ\apache-tomcat-7.0.47x64\bin\setclasspath.bat

rem ---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
rem are valid and consistent with the selected start-up options and set up the
rem endorsed directory.
rem
rem $Id: setclasspath.bat 1202062 2011-11-15 06:50:02Z mturk $
rem ---------------------------------------------------------------------------

set JAVA_HOME="D:\Progs\jdk1.7.0_45_x64"

 

2. C:\AppServ\apache-tomcat-7.0.47x64\conf\tomcat-users.xml

<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>

 

再執行 C:\AppServ\apache-tomcat-7.0.47x64\bin\startup.bat | shutdown.bat 即可開關 Tomcat Server,並可以在 http://localhost:8080/manager/html 透過帳號/密碼:tomcat/tomcat 來管理。

文章標籤
創作者介紹
MIS

MISTECH 技術手抄本

MIS 發表在 痞客邦 PIXNET 留言(0) 人氣()