環境:
虛擬機VM14
Ubuntu16.04
java 1.8
步驟:
先更新
sudo apt-get update
然后安裝:
sudo apt-get install tomcat8
等一會 然后出現兩個Done的時候就是安裝好了,默認會自己啟動,打開瀏覽器,輸入localhost:8080,出現如下界面,就是安裝好了。
安裝位置:
webapps位置也在上圖
sudo service tomcat8 status 查看狀態
sudo service tomcat8 start 啟動
sudo service tomcat8 stop 停止
如果出現:
failed to start lsb:start tomcat
這樣的,很可能是你的war也就是你的項目有問題,無法啟動。