記一次tomcat war包應用簡單部署過程html
by:授客 QQ:1033553122java
Linuxweb
apache-tomcat-7.0.73apache
# 解壓tomcat壓縮包至指定目錄bootstrap
# mkdir tomcat
# mv apache-tomcat-7.0.73.tartomcat
# tar -xvf apache-tomcat-7.0.73.tarapp
# cd apache-tomcat-7.0.73webapp
# war包打包好後,放到tomcat的webapps目錄下url
# mv /home/appdeploy/test-platform-web.war ./webapps/spa
# 有必要的話,進入到tomcat conf配置目錄,對配置文件,好比server.xml作些更改
# 進入到tomcat的bin目錄下,啓動tomcat
# cd bin
# 啓動tomcat以前,若是本機有安裝多個jdk版本,能夠更改setclasspath.sh文件,設置JAVA環境變量,指定tomcat使用的java運行環境,以下,
# sh startup.sh
Using CATALINA_BASE: /home/appdeploy/tomcat/apache-tomcat-7.0.73
Using CATALINA_HOME: /home/appdeploy/tomcat/apache-tomcat-7.0.73
Using CATALINA_TMPDIR: /home/appdeploy/tomcat/apache-tomcat-7.0.73/temp
Using JRE_HOME: /app/jdk/jdk1.8.0_25/jre
Using CLASSPATH: /home/appdeploy/tomcat/apache-tomcat-7.0.73/bin/bootstrap.jar:/home/appdeploy/tomcat/apache-tomcat-7.0.73/bin/tomcat-juli.jar
Tomcat started.
# 固然,到此還不必定啓動成功了,保險起見,查看下tomcat日誌,看是否出錯
# tail -f ../logs/catalina.out
$ netstat -ant | grep 8080 # 假設鏈接端口爲 8080