CentOS7中关闭selinux
在安装Cobbler和Puppet时需要关闭selinux,但是通常情况下载安装完CentOS7后,默认情况下SElinux是启用状态,
如下所示:
- [root@rdo ~]# sestatus
- SELinux status: enabled
- SELinuxfs mount: /sys/fs/selinux
- SELinux root directory: /etc/selinux
- Loaded policy name: targeted
- Current mode: enforcing
- Mode from config file: enforcing
- Policy MLS status: enabled
- Policy deny_unknown status: allowed
- Max kernel policy version: 28
1、如果要临时关闭,可以执行
- setenforce 0
此时的状态如下
- [root@rdo ~]# sestatus
- SELinux status: enabled
- SELinuxfs mount: /sys/fs/selinux
- SELinux root directory: /etc/selinux
- Loaded policy name: targeted
- Current mode: permissive
- Mode from config file: enforcing
- Policy MLS status: enabled
- Policy deny_unknown status: allowed
- Max kernel policy version: 28
2、如果要永久关闭,可以修改配置文件/etc/selinux/config,将SELINU置为disabled。
- [root@rdo ~]# cat /etc/selinux/config
- # 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=enforcing
- SELINUX=disabled
- # SELINUXTYPE= can take one of three two values:
- # targeted - Targeted processes are protected,
- # minimum - Modification of targeted policy. Only selected processes are protected.
- # mls - Multi Level Security protection.
- SELINUXTYPE=targeted
修改该配置文件也可以执行下面的命令来完成
- sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
修改完成后,保存重启,重启后状态如下:
- [root@rdo ~]# sestatus
- SELinux status: disabled
http://www.centoscn.com/CentOS/config/2015/0618/5681.html
CentOS7中关闭selinux的更多相关文章
- 003 centos7中关闭防火墙
在centos7中,防火墙有了新的变化.下面是常用的几个命令. 1.查看状态 systemctl status firewalld 2.关闭防火墙 systemctl stop firewalld.s ...
- 在gfs2中关闭selinux
在构建iSCSI存储集群时,请勿在gfs2中使用selinux
- CentOS7中关闭firewall,并使用iptables管理防火墙
背景描述 在使用Docker时,启用centos7默认的firewall,启动端口映射时,防火墙规则不生效.docker默认使用了iptables防火墙机制.所以需要关闭firewall使用iptab ...
- CentOS7/6 关闭防火墙
CentOS6关闭防火墙使用以下命令, //临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off CentOS7中若使用同样的命令会报错 ...
- Redhat Enterprise Linux中如何关闭SELinux?
转自http://www.cnitblog.com/lywaml/archive/2005/06/21/468.html 红帽企业 Linux 4 包括了一个 SELinux 的实现.SELinux ...
- SELinux 了解及CentOS7 中 semanage命令的安装
SELinux 安全子系统 SELinux(Security-Enhanced Linux)是美国国家安全局在Linux开源社区的帮助下开发的一个强制访问控制(MAC,Mandatory Access ...
- centos7 关闭SELINUX 防火墙
关闭SELINUXvi /etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加 ...
- centos7 关闭selinux
关闭SeLinux 临时关闭:setenforce 0 永久关闭:vi /etc/selinux/config
- centos7防火墙以设置以及关闭selinux
一.CentOS 7.X 关闭SELinux 1.查看 getenforce permissive 或者 enforcing模式 2.临时设置 setenforce 1 成为permissive模式 ...
随机推荐
- RPD Volume 168 Issue 4 March 2016 评论7-end
Shielding activation of petawatt laser facilities in Romania: a FLUKA preliminary evaluation Abstr ...
- CentOS 安装 Zookeeper 版本任选
Zookeeper下载地址各种版本自己选择: https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ Zookeeper 3.4.13版本下载地址 ...
- luogu P1802 5倍经验日
题目背景 现在乐斗有活动了!每打一个人可以获得5倍经验!absi2011却无奈的看着那一些比他等级高的好友,想着能否把他们干掉.干掉能拿不少经验的. 题目描述 现在absi2011拿出了x个迷你装药物 ...
- [LOJ6433]最大前缀和
深刻感受到自己的水平和机房里的其他人相差甚远,他们都是随手秒这个题的... $n$很小,考虑状压DP 当一个序列在某个位置取到最大前缀和后,意味着如果把后面的数抽出来单独成序列,那么它的每个前缀和都$ ...
- Echarts无数据时只显示文字不显示动画
只需要在option中加入如下代码即可: noDataLoadingOption: { text: '暂无数据', ...
- 8.4(Java学习笔记)java脚本引擎(Rhino)
一.java脚本引擎 java脚本引擎是沟通java和脚本语句之间的桥梁,可以通过对应的脚本引擎在java中调用各种脚本语言. 二.脚本引擎执行脚本代码 ScriptEngineManager:为Sc ...
- Easyui treegrid 无法显示树形结构解决办法
easyui treegrid 中检查了数据结构没有问题的,但就是不展示树形结构, 检查发现原来是 var columnsAll = [ { title: '任务ID', field: 'TaskID ...
- Delphi 获取sqlite中所有的表名
取得sqlite数据库里所有的表名 查询table,type 段是'table',name段是table的名字, so: select name from sqlite_master where ty ...
- Linux下交叉编译gdb和gdbserver
平台:tq2440 GCC: gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) 这里过程中参考了下面两篇博文: http://blog.csdn.ne ...
- C#中使用 HttpWebRequest 向网站提交数据
HttpWebRequest 是 .NET 基类库中的一个类,在命名空间 System.Net 里,用来使用户通过 HTTP 协议和服务器交互. HttpWebRequest 对 HTTP 协议进行了 ...