1. 程式人生 > >JDK和Tomcat安裝配置

JDK和Tomcat安裝配置

JDK1.8:https://pan.baidu.com/s/18pshIIfkUdz-ekILM57qAw 提取碼:ecac 

Tomcat:https://pan.baidu.com/s/1XHdH2L46vRQW97xAIGxnxg 提取碼:o3sr

JDK和Tomcat解壓後放到D盤的program資料夾下

配置環境變數:
JAVA_HOME: D:\program\jdk1.8.0_45
TOMCAT_HOME: D:\program\apache-tomcat-7.0.34
CATALINA_HOME: D:\program\apache-tomcat-7.0.34
Path: %JAVA_HOME%\bin;%TOMCAT_HOME%\bin;%CATALINA_HOME%\lib;
JDK環境變數驗證: java 和 javac
Tomcat版本資訊: version
Tomcat啟動命令: startup 瀏覽器驗證啟動成功:localhost:8080
Tomcat關閉命令: shutdown 瀏覽器驗證關閉成功:localhost:8080
修改Tomcat預設監聽埠:D:\program\apache-tomcat-7.0.34\conf\server.xml
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
Tomcat部署專案:
方法一: 將TestReport.war解壓後放到webapps資料夾下,然後啟動Tomcat
方法二:D:\program\apache-tomcat-7.0.34\conf\server.xml
<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Context path="/TestReport" reloadable="false"  docBase="D:\program\apache-tomcat-7.0.34\webapps\TestReport" />
</Host>
訪問路徑: localhost:8080/TestReport/