centos6关闭selinux和防火墙
#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 enf
#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
这个命令可以查看防火墙的状态
更多推荐
所有评论(0)