1、打开
https://tomcat.apache.org/download-80.cgi
右键+复制链接地址
http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29-fulldocs.tar.gz
2、
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29-fulldocs.tar.gz
3、创建tomcat目录:mkdir /opt/tomcat
4、移动安装包到tomcat目录下:mv apache-tomcat-8.5.29-fulldocs.tar.gz /opt/tomcat/
5、进入Tomcat目录解压安装包:tar -zxvf apache-tomcat-8.5.29.tar.gz
6、配置startup.sh文件:vi /opt/tomcat/apache-tomcat-8.5.29/bin/startup.sh
将下面内容添加到最后一行前面:
export CLASSPATH=$CLASSPATH:%JAVA_HOME/lib/tools.jar
export TOMCAT_HOME=/opt/tomcat/apache-tomcat-8.5.29/
export CATALINA_HOME=$TOMCAT_HOME
export PATH=$PATH:$TOMCAT_HOME/bin
7、保存退出,重启Tomcat:./startup.sh