SELINUX
>>> /usr/sbin/sestatus -v
或者
>>> getenforce
>>> setenforce 0
##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式
>>> vim /etc/selinux/config
# 将SELINUX=enforcing改为SELINUX=disabled
# 设置后需要重启才能生效
>>> reboot
防火墙
>>> chkconfig iptables on
>>> chkconfig iptables off
# 重启生效
>>> reboot
>>> service iptables start
>>> service iptables stop
# centos7方法
>>> systemctl start firewalld
>>> systemctl stop firewalld
# 查看状态
>>> systemctl status firewalld
# 开机禁用
>>> systemctl disable firewalld
# 开机启用
>>> systemctl enable firewalld
网友评论