1.关闭防火墙
systemctl stop firewalld.service 关闭
systemctl disable firewalld.service 禁用
2.关闭SELINUX
2.1 零时关闭(
不建议使用)
[root@fan102 ~]# setenforce 0
但是这种方式只对当次启动有效,重启机器后会失效。
2.2 永久关闭(
建议
使用)
2.2.1 修改配置文件/etc/selinux/config
[root@fan102 ~]# vim /etc/selinux/config
将SELINUX=enforcing 改为SELINUX=disabled
SELINUX=disabled
2.2.2 同步/etc/selinux/config配置文件
[root@fan102 ~]# xsync /etc/selinux/config