您的位置:首页 > 运维架构 > Linux

centos6关闭selinux和防火墙

2016-08-15 15:22 453 查看
#vi /etc/selinux/config

将文件里标红的部分改为disabled

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

重启后永久关闭selinux

#sestatus -v

这个命令可以查看selinux的状态

#setenforce 0

这个命令可以临时关闭selinux

#service iptables stop

#service ip6tables stop

这个命令可以临时关闭防火墙

#chkconfig iptables off

#chkconfig ip6tables off

这个命令可以永久关闭防火墙

#chkconfig iptables --list

#chkconfig ip6tables --list

这个命令可以查看防火墙的状态
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos 防火墙