安装说明
安装环境:CentOS-7
安装方式:源码安装
软件:apache-tomcat-8.0.14.tar.gz
下载地址:http://tomcat.apache.org/download-80.cgi
安装前提
系统必须已安装配置JDK6+,安装请参考:在CentOS 7中安装与配置JDK8。
安装tomcat
将apache-tomcat-8.0.14.tar.gz文件上传到/usr/local中执行以下操作:
- [root@localhost~]#cd/usr/local
- [root@localhost~]#tar-zxv-fapache-tomcat-8.0.14.tar.gz//解压压缩包
- [root@localhost~]#rm-rfapache-tomcat-8.0.14.tar.gz//删除压缩包
- [root@localhost~]#mvapache-tomcat-8.0.14.tar.gz
启动TOMCAT
执行以下操作:
- [root@localhost~]#/soft/tomcat02/bin/startup.sh
显示如下,则代表成功
Using CATALINA_BASE: /soft/tomcat02
Using CATALINA_HOME: /soft/tomcat02
Using CATALINA_TMPDIR: /soft/tomcat02/temp
Using JRE_HOME: /
Using CLASSPATH: /soft/tomcat02/bin/bootstrap.jar:/soft/tomcat02/bin/tomcat-juli.jar
Tomcat started.防火墙开放8080端口增加8080端口到防火墙配置中,执行以下操作:
- [root@localhost~]#vi+/etc/sysconfig/iptables</span>
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
重启防火墙
- [root@localhost~]#serviceiptablesrestart</span>
通过以下地址查看tomcat是否运行正常:
http://127.0.0.1:8080/
看到tomcat系统界面,说明安装成功!
停止Tomcat
- [root@localhost~]#/usr/local/tomcat/bin/shutdown.sh//停止tomcat</span>
@H_301_272@
@H_301_272@安装tomcat修改8080之后重启防火墙
@H_301_272@查看防火墙状态
@H_301_272@systemctl status firewalld.service@H_301_272@启动防火墙
systemctl start firewalld.service
关闭防火墙
systemctl stop firewalld.service 原文链接:https://www.f2er.com/centos/381999.html