service iptables restart
service iptables start
service iptables stop (如果安装了这个防火墙的话,需要关掉)
//查看防火墙状态
systemctl status firewalld
//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld
-----------------------------------------
关闭selinux(默认安装完系统是关闭的)
临时关闭:
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
永久关闭:
[root@localhost ~]# vim /etc/sysconfig/selinux
SELINUX=enforcing 改为 SELINUX=disabled
重启服务reboot