Ubuntu16.04 install apache-tomcat-8.5.20.tar.gz

1.下载tomcat  http://tomcat.apache.org/download-80.cgi

2.解压tomcat  tar -zxvf apache-tomcat-8.5.20.tar.gz

3.剪切解压后的文件到 /opt 目录  sudo mv apache-tomcat-8.5.20 /opt/tomcat

4.进入 /opt/tomcat目录  cd /opt/apache-tomcat-8.5.20

5.打开启动的脚本文件  sudo vim bin/startup.sh

 

export JAVA_HOME=/opt/jdk

export JRE_HOME=${JAVA_HOME}/jre

export PATH=${JAVA_HOME}/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export TOMCAT_HOME=/opt/tomcat

添加以上代码,路径适当更改

exec "$PRGDIR"/"$EXECUTABLE" start "$@" 

 
6.启动tomcat  bin/startup.sh
7.验证tomcat配置和安装是否成功  http://localhost:8080/

8.关闭tomcat  bin/shutdown.sh

posted on 2017-10-01 16:30  唐先生_DowneyJr  阅读(294)  评论(0编辑  收藏  举报

导航