zengbin93 / blog

17 stars 10 forks source link

实践 - CentOS #6

Open zengbin93 opened 6 years ago

zengbin93 commented 6 years ago

记录CentOS的一些操作经验

zengbin93 commented 6 years ago

基础信息查询

基础信息查询包括:1)系统信息;2)硬件信息;3)资源利用信息。

系统信息

zengbin93 commented 6 years ago

防火墙设置

CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的

CentOS 7 采用了 firewalld 防火墙

查询端口是否开启

如要查询是否开启80端口则:

[root@joe-pc ~]# firewall-cmd --query-port=80/tcp
no

显然80端口没有开启

开启端口

开启80端口的命令如下:

[root@joe-pc ~]# firewall-cmd --add-port=80/tcp
success