安装tomcat比较简单,解压出来就可以用了
一 上传源码到linux
我上传到了/usr/local/tomcat目录下面
这个因人而异,不影响的
二 解压tomcat
解压到当前目录
tar zxvf apache-tomcat-8.5.16.tar.gz
解压到其他目录
tar zxvf apache-tomcat-8.5.16.tar.gz -C /tomcathome
三 启动,停止tomcat
启动tomcat
进入tomcat的bin目录,执行
./startup.sh
停止tomcat
进入tomcat的bin目录,执行
./shutdown.sh
四 开启8080端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent 永久开启8080端口
firewall-cmd --reload 重新载入
现在在浏览器上就可以访问了