查看firewalld状态
[ root@hao ~]# Systemctl status firewalld.service
running表示已开启状态
关闭firewalld
[ root@hao ~]# Systemctl stop firewalld
设置开机自动关闭
[ root@hao ~]# Systemctl disable firewalld
相关指令
[root@hao ~]# systemctl status firewalld.service #查看firewalld状态
[root@hao ~]# systemctl stop firewalld #关闭
[root@hao ~]# systemctl start firewalld #开启
[root@hao ~]# systemctl disable firewalld #开机自动关闭
[root@hao ~]# systemctl enable firewalld #开机自动启动
临时和永久关闭Selinux
临时关闭
[root@hao ~]# getenforce #查看状态
Enforcing
[root@hao ~]# setenforce 0 #关闭
[root@hao ~]# getenforce
Permissive
永久关闭
修改/etc/selinux/config文件
重启即可