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


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