Ubuntu系統tomcat8簡易安裝

參考 http://www.liquidweb.com/kb/how-to-install-apache-tomcat-8-on-ubuntu-14-04/java

提示:目前eclipse neon還不支持tomcat8.5,請下載tomcat 8.0。The Apache Tomcat installation at this directory is version 8.5.0. A Tomcat 8.0 installation is expected.web

  1. 下載 apache tomcat 8 http://tomcat.apache.org/download-80.cgi
  2. 解壓  tar xzvf apache-tomcat-8.5.5.tar.gz 
  3.  $sudo mkdir /opt/tomcat8
  4. $sudo mv apache-tomcat-8.5.5 /opt/tomcat8/
  5. vim ~/.profile 最後一行加入  export CATALINA_HOME=/opt/tomcat8/apache-tomcat-8.5.5  
  6. 測試tomcat $ $CATALINA_HOME/bin/startup.sh 輸出以下內容表示成功

Using CATALINA_BASE:   /opt/tomcat8/apache-tomcat-8.5.5
Using CATALINA_HOME:   /opt/tomcat8/apache-tomcat-8.5.5
Using CATALINA_TMPDIR: /opt/tomcat8/apache-tomcat-8.5.5/temp
Using JRE_HOME:        /opt/java/jdk1.8.0_101/jre
Using CLASSPATH:       /opt/tomcat8/apache-tomcat-8.5.5/bin/bootstrap.jar:/opt/tomcat8/apache-tomcat-8.5.5/bin/tomcat-juli.jar
Tomcat started.apache

注:包括java的環境變量,.profile文件尾部內容爲: bootstrap

export JAVA_HOME=/opt/java/jdk1.8.0_101 
export JRE_HOME=${JAVA_HOME}/jre 
export CLASSPATH=${JAVA_HOME}/lib:${JRE_HOME}/jre:${CLASSPATH} 
export PATH=${JAVA_HOME}/bin:${PATH} 
export CATALINA_HOME=/opt/tomcat8/apache-tomcat-8.5.5
相關文章
相關標籤/搜索