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模式 ...
随机推荐
- 更新archlinux
有个上网本,虽然配置很差,但是安装的是arch,这不长时间不滚动更新出问题了, :: Proceed with installation? [Y/n] (/) checking keys % (/) ...
- HDOJ 5009 Paint Pearls
Dicripntion Lee has a string of n pearls. In the beginning, all the pearls have no color. He plans t ...
- 前端基础-HTML标记语言
阅读目录 一. HTML标签与文档结构 二. HTML标签详细语法与注意点 三. HTML中标签分类 四. HTML注释 一. HTML标签与文档结构 HTML作为一门标记语言,是通过各种各样的标签来 ...
- 【R笔记】R的内存管理和垃圾清理
笔记: 1.R输入命令时速度不要太快,终究是个统计软件,不是编程! 2.memory.limit()查看当前操作系统分配内存给R的最大限度(单位是M?) 3.要经常 rm(object) 或者 rm( ...
- Visual Studio 版本互转工具
Visual Studio 版本互转工具 http://www.cnblogs.com/flydoos/archive/2011/08/20/2146121.html http://www.cnblo ...
- CRC代码实现
CRC代码实现1: #include <stdio.h> #include <string.h> unsigned int cfgCrc32(const unsigned ch ...
- zk介绍
1. 配置管理 Zookeeper提供了这样的一种服务:一种集中管理配置的方法,我们在这个集中的地方修改了配置,所有对这个配置感兴趣的都可以获得变更.这样就省去手动拷贝配置了,还保证了可靠和一致性. ...
- [Java基础] 使用JMAP dump及分析dump文件
转载:http://blog.csdn.net/kevin_luan/article/details/8447896 http://liulinxia02.blog.163.com/blog/stat ...
- javascript快速入门6--Script标签与访问HTML页面
Script标签 script标签用于在HTML页面中嵌入一些可执的脚本 <script> //some script goes here </script> script标签 ...
- Mounting the NFS share on a Windows server
今天遇到一个相当奇怪的问题,在windows 上mount LINUX NFS, powershell 脚本可以成功, 用图形界面也可以成功,但BATCH就是不行.提示53网络错误. 不过公司已经有人 ...