1、關閉 firewalld:
[root@localhost ~]# systemctl stop firewalld [root@localhost ~]# systemctl disable firewalld
--------------------------------------
2、關閉 selinux:
[root@localhost ~]# vi /etc/sysconfig/selinux SELINUX=disabled #修改
3、重啟機器:
[root@localhost ~]# shutdown -r now
4、close_firewalld_selinux.sh
#!/bin/bash
systemctl stop firewalld
systemctl disable firewalld
sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/sysconfig/selinux
shutdown -r now