安装CentOS时忘记了关闭iptables和SELinux
进入防火墙界面命令: system-config-securitylevel
配置完成后我们可以用命令查看一下,正确关闭iptables和SELinux时应显示如下内容:
#iptables -nv -L
................................................
#getenforce
Disabled
如果是用命令行:
service iptables stop
chkconfig iptables off
要关闭SELinux,可使用以下命令行临时关闭之。SELinux由开启状态转为关闭状态后,最好是重启一下服务器。
setenforce 0