###centos7常用命令 防火墙
#启动firewall
systemctl start firewalld.service
#停止firewall
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service
#查看默认防火墙状态
firewall-cmd --state
iptables
# 安装iptables
yum install iptables-services
# iptables配置文件路径
vi /etc/sysconfig/iptables
#开机启动/禁用iptables
systemctl enable iptables.service
systemctl disable iptables.service
#开启/停止服务
systemctl start iptables.service
systemctl stop iptables.service
#查看状态
systemctl status iptables.service
nginx
nginx -t 检查nginx配置文件
nginx -s reload 重新加载配置文件