CentOS7 部署tomcat

一、环境说明:

在 CentOS7下面部署tomcat7 。

二、tomcat部署

1.新建tomcat目录  mkdir tomcat 

2.上传tomcat 安装文件   apache-tomcat-7.0.69.tar.gz   

3. 解压 tar zxvf  apache-tomcat-7.0.69.tar.gz ,并修改文件夹名称(mv apache-tomcat-7.0.69  tomcat )

4.启动tomcat 。  进入bin目录下 ./startup.sh  

随即提示tomcat启动成功! 

 

三、在局域网内访问tomcat

问题:无法访问。 究其原因,防火墙所致!

关闭防火墙

 

二、Centos 7版本解决办法:

1、停止并屏蔽firewalld服务

  • systemctl stop firewalld
  • systemctl mask firewalld

2、安装iptables-services软件包

  • yum install iptables-services

3、在引导时启用iptables服务

  • systemctl enable iptables

4、启动iptables服务

  • systemctl start iptables

5、保存防火墙规则

  • service iptables save
  • /usr/libexec/iptables/iptables.init save

 

另外:管理iptables服务

systemctl [stop|start|restart] iptables


    天津雍博科技有限责任公司

    欢迎大家访问www.yongbosoft.com ,崇尚技术,为您提供完美产品,优质服务!

 
posted @ 2017-10-17 15:12  roundlight  阅读(429)  评论(1编辑  收藏  举报