关闭selinux(防火墙)方法分享
2015-01-12 20:15
393 查看
刚好手工装完一台CentOS6.4,就顺便记录一下。
.代码如下:
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
你可以运行下面命令,马上禁用selinux
.代码如下:
setenforce 0*/
这个时候你查看selinux的状态
.代码如下:
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
对比一下,你就可以看出变化。重启后,设置就失效。如果你希望重启生效,那么你就需要修改配置文件/etc/selinux/config
.代码如下:
#SELINUX=enforcing
SELINUX=disabled
或者你可以运行下面命令
.代码如下:
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
这个时候,你重启机器,再查看selinux的状态
.代码如下:
# sestatus
SELinux status: disabled
.代码如下:
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
你可以运行下面命令,马上禁用selinux
.代码如下:
setenforce 0*/
这个时候你查看selinux的状态
.代码如下:
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
对比一下,你就可以看出变化。重启后,设置就失效。如果你希望重启生效,那么你就需要修改配置文件/etc/selinux/config
.代码如下:
#SELINUX=enforcing
SELINUX=disabled
或者你可以运行下面命令
.代码如下:
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
这个时候,你重启机器,再查看selinux的状态
.代码如下:
# sestatus
SELinux status: disabled
相关文章推荐
- 关闭selinux(防火墙)方法分享
- 分享:centos关闭iptables防火墙的方法
- Redhat关闭防火墙和SELinux方法
- 分享:centos关闭iptables防火墙的方法
- CentOS 6.6永久关闭 SELinux与防火墙 的方法
- win7自带防火墙开启关闭方法分享
- centos 关闭防火墙以及关闭selinux方法
- Linux 下SElinux以及防火墙的关闭
- 不重启Linux服务器关闭SeLinux的方法
- 关闭SELinux的方法:
- 关闭SELinux的方法
- 关闭linux的SElinux的方法
- 关闭SElinux方法
- Fedora关闭SELinux正确的方法
- 不重启关闭SeLinux的方法
- ME525+ MB525 android2.3.4获取ROOT权限和关闭震动(振动反馈)的方法分享
- 关闭SELinux的方法
- 关闭SELinux的方法
- 不重启Linux服务器关闭SeLinux的方法
- redhat5关闭防火墙的方法-chkconfig临时关闭iptables