1.到tomcat官网下载。Linux认准:tar.gz (pgp, sha512)
http://tomcat.apache.org/download-80.cgi
2.解压放到:
/usr/local/src/apache-tomcat-8.5.37/conf
3.如果防火墙没打开。需先打开
4.找到bin/startup.sh目录
添加路径,如:
JAVA_HOME=/usr/java/jdk1.8.144
JRE_HOME=/usr/java/jdk1.8.144/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
TOMCAT_HOME=/opt/apache-tomcat-8.5.32
5.启动tomcat
./startup.sh
6.验证
http://localhost:8080
参考链接:https://blog.csdn.net/qq_22980667/article/details/81006883