Linux下部署 tomcat服务器

tar zxvf apache-tomcat-7.0.82.tar.gz //解压tomcat 服务器

进入tomcat中的bin,并启动tomcat。
./startup.sh

在windows中要访问tomcat,需要关闭防火墙
centos 7关闭方式:
systemctl stop firewalld

vim /etc/profile //添加tomcat 环境变量
CATALINA_HOME=/usr/tomcat/apache-tomcat-7.0.82
export JAVA_HOME JRE_HOME PATH CLASSPATH CATALINA_HOME

chmod -R 777 /usr/tomcat/apache-tomcat-7.0.82/bin/ //给bin目录授权

vim /etc/sysconfig/iptables // 开放8080 端口

添加以下内容

-A INPUT -m state –state NEW -m tcp -p tcp –dport 8080 -j ACCEPT

1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd –state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

http://blog.csdn.net/xlgen157387/article/details/52672988

curl loacalhost:8080 //可以看是否可以访问到,一般下载的是主页

netstat -ano | findstr :8080 //查看8080 端口是否被监听

外网不能访问阿里云部署的服务问题总结:
需要在管理面板里添加安全组,centOS7 换防火墙,打开需要开放的端口

参考链接:
https://help.aliyun.com/knowledge_detail/59367.htmlhttps://help.aliyun.com/knowledge_detail/59367.html
https://help.aliyun.com/knowledge_detail/40744.html
https://help.aliyun.com/document_detail/25475.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值