-
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.31/bin/apache-tomcat-9.0.31.tar.gz
-
解压
tar -zxvf apache-tomcat-9.0.31
-
运行
# 1. 进入 Tomcat bin目录 cd apache-tomcat-9.0.31/bin # 2. 启动 ./startup.sh
-
启动报错
-
报错一:忘记安装 JDK了
-
解决办法:当然是先安装 JDK了
-
-
再次启动:启动成功
Using CATALINA_BASE: /root/DevInstall/apache-tomcat-9.0.31-src Using CATALINA_HOME: /root/DevInstall/apache-tomcat-9.0.31-src Using CATALINA_TMPDIR: /root/DevInstall/apache-tomcat-9.0.31-src/temp Using JRE_HOME: /usr Using CLASSPATH: /root/DevInstall/apache-tomcat-9.0.31-src/bin/bootstrap.jar:/root/DevInstall/apache-tomcat-9.0.31-src/bin/tomcat-juli.jar Tomcat started.
-
查看
-
开放端口
查看防火墙状态 firewall-cmd --state 查看已开放的列表 firewall-cmd --list-ports 添加要开放的列表 firewall-cmd --zone=public --add-port=8080/tcp --permanent 重启防火墙 firewall-cmd --reload
-