wget mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz
tar -zxvf apache-tomcat-8.0.53.tar.gz
/usr/local/tomcat
mkdir -p /usr/local/tomcatmv apache-tomcat-8.0.53 /usr/local/tomcat/
yum install java-1.8.0-openjdk-src.x86_64
/usr/local/tomcat/apache-tomcat-8.0.53/bin/startup.sh
curl http://127.0.0.1:8080
Firewalld
防火墙为iptables
1.禁用Firewalld服务。# systemctl mask firewalld2.停止Firewalld服务。#systemctl stop firewalld3.安装iptables服务相关软件包。#yum -y install iptables-services4.确保服务在开机时启动:# systemctl enable iptables5.启动iptables服务。# systemctl start iptables6.如果需要ip6tables,则运行以下命令。# systemctl enable ip6tables# systemctl start ip6tables
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
iptables
systemctl restart iptables
Tomcat
开机自启vi /etc/rc.d/rc.local
/usr/local/tomcat/apache-tomcat-8.0.53/bin/startup.sh start
chmod 777 /etc/rc.d/rc.local
联系客服