- wget 下载tomcat安装包
# 下载地址: https://tomcat.apache.org
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz
- 解压安装包
tar zxvf apache-tomcat-8.5.37.tar.gz
- 移动tomcat到usr/local/
mv apache-tomcat-8.5.37 /usr/local/tomcat
- 启动tomcat
cd /usr/local/tomcat/
./bin/startup.sh
- 打开8080端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
- 可配置80端口并重启
./bin/shutdown.sh
vi /usr/local/tomcat/conf/server.xml
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
./bin/startup.sh
网友评论