无论做大项目还是大实验都要把环境提前搭好不然后面的好多项目和实验都会出错! 今天本菜和大家分享一下centos防火墙和selinux安全策略
centos6:
service iptables stop 关闭停止
chkconfig iptabbles off 设置开机自动关闭
关闭selinux
sed -ri ‘s/^SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
查看是否关闭了selinux
cat /etc/selinux/config
centos7和8方法一样:
systemctl stop firewalld 关闭停止
systemctl disable firewalld &> /dev/null 开机自动关闭
关闭完如何查看是否真的已关闭
systemctl disable firewalld 先看禁用防火墙
systemctl status firewalld 再查看防火墙状态
dead (死!)说明真的已经关闭了!