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模式 ...
随机推荐
- SPOJ UOFTCG - Office Mates (树的最小路径覆盖)
UOFTCG - Office Mates no tags Dr. Baws has an interesting problem. His N graduate students, while f ...
- Jenkins设置用户权限
注册普通用户 系统管理-->全局安全配置---勾选允许用户注册 注册用户完成后立即关闭注册,比如我注册了(dev, test),现在我一共有3个用户,root是管理员拥有所有权限 开启授权策略 ...
- [BZOJ 3144] 切糕
Link: BZOJ 3144 传送门 Solution: 发现要把点集分成不连通的两部分,最小割的模型还是很明显的 首先我们将原图转化为$R+1$层,从而将点权化为边权 关键还是在于建图是怎么保证$ ...
- 【线段树】bzoj3038 上帝造题的七分钟2 / bzoj3211 花神游历各国
暴力修改,记录一段是否全部为1或0,若全是了,则不再修改. 注意3211一定要判是否为0,否则会T得惨无人道. #include<cstdio> #include<cmath> ...
- Problem P: 素数求和
#include<stdio.h> int main() { ; scanf("%d",&n); n>=&&n<=; ;i<= ...
- Spark1.4远程调试
1)首先,我们是在使用spark-submit提交作业时,使用 --driver-java-options ”-Xdebug -Xrunjdwp:transport=dt_socket,server= ...
- Scala实战高手****第11课:Scala面向接口彻底实战和Spark源码鉴赏
第一点: scala的接口trait中所有方法可以都被实现!! 这种情况一般会是一种工具方法的集合,例如接口 Logging! scala 多种继承用extends ... with .... 在老 ...
- Ubuntu 16.04下使用UNetbootin制作的ISO镜像为U盘启动出现:Missing Operating System (mbr.bin)
通过以下方式进行排查: 1.确定U盘是否真的有启动系统 2.分区是否已经标记为激活状态,尤其使用了Fdisk进行分区时,如果分区>=2时默认是不设置激活分区. 比如下面是通过Fdisk进行设置分 ...
- MSGPACK序列和还原TFDParams
MSGPACK序列和还原TFDParams unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, S ...
- Docker实践2:安装Docker及weblogic镜像
安装Docker 以root登录,运行 vi /etc/yum.repos.d/public-yum-ol6.repo,添加如下段落 [ol6_addons]name=Oracle Linux $re ...