aliyun的使用准备

http://blog.csdn.net/zhangbing2434/article/details/50549704

1安装xshell

2安装xshell文件游览插件xftp5 http://download.csdn.net/detail/dounine/9186529

3安装jdk

4安装tomcat

5设置阿里云的安全组,开放22端口与8080端口 https://blog.52itstyle.com/archives/957/?ref=myread

6CentOs7的防火墙开启,8080端口开放(其实关闭centos7的防火墙也可以)http://www.tuicool.com/articles/IrqIjeq

7阿里云官方教程:手工部署javaweb项目

阿里云服务器CentOS7的防火墙问题

时间:2016-03-17 02:32来源:blog.csdn.net 作者:东方败败的博客 举报 点击:1748次

最近在捣鼓个人网站上线的问题,由于nodejs的express框架默认监听的3000端口,在改成80端口时却出现了无法访问的情况,在排查问题的过程中涉及到了CentOS7的防火墙问题,在次做个记录。

Centos升级到7之后,发现无法使用iptables控制Linuxs的端口,google之后发现Centos 7使用firewalld代替了原来的iptables。下面记录如何使用firewalld开放Linux端口:

开启防火墙:

 

[plain] view plain copy
 
  1. systemctl start firewalld  
查看防火墙状态:

 

 

[html] view plain copy
 
  1. systemctl status firewalld  
开启端口:

 

 

[html] view plain copy
 
  1. firewall-cmd --zone=public --add-port=80/tcp --permanent  

 

命令含义:

--zone #作用域

--add-port=80/tcp #添加端口,格式为:端口/通讯协议

--permanent #永久生效,没有此参数重启后失效

重启防火墙:

 

[html] view plain copy
 
  1. firewall-cmd --reload  
更多操作可以查看github的这篇回答:

 

http://stackoverflow.com/questions/24729024/centos-7-open-firewall-port

另附firewalld使用简介:

http://www.centoscn.com/CentOS/help/2015/0208/4667.html


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章