安装tomcat
Index of /dist/tomcat/tomcat-9/v9.0.8/bin
下载apache-tomcat-9.0.8.tar.gz,可以使用wget;
2、将压缩包tar -zxvf apache-tomcat-9.0.8.tar.gz解压到/home/tomcat
3、修改环境变量
vi /etc/profile
export JAVA_HOME=/home/java/jdk1.8.0_221
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export CATALINA_HOME=/home/tomcat/apache-tomcat-9.0.8(此条为新增)
export PATH=$PATH:${JAVA_HOME}/bin:${CATALINA_HOME}/bin(:${CATALINA_HOME}/bin为新增)
4、启动tomcat,执行
/home/tomcat/apache-tomcat-9.0.8/bin/startup.sh
检查tomcat是否启动
netstat -antp | grep 8080
ps -ef | grep tomcat
tail -f /home/tomcat/apache-tomcat-9.0.8/logs/catalina.out