以下介绍一下SELinux相关的工具
/usr/bin/setenforce 修改SELinux的实时运行模式
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式
如果要彻底禁用SELinux 需要在/etc/sysconfig/selinux中设置参数selinux=0
,或者在/etc/grub.conf中添加这个参数
/usr/bin/setstatus -v
察看系统的状态
以下是运行输出,请参考
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Policy version: 18 不重启关闭selinux的解决办法:
执行命令:setenforce 0
在新版本中的Red Hat 和 Fedora 上,修改档案/etc/sysconfig/selinux:
# 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 - SELinux is fully disabled.
SELINUX=enforcing # SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted 把 SELINUX设定为disable, 下次启动系统后将会停止SElinux。
Linux核心参数(Kernel Parameter) 或者可以在核心参数后加上: selinux=0 (停止) 或 selinux=1 (开启)参数 档案/boot/grub/menu.lst title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet selinux=0
initrd /initrd-2.6.18-1.2798.fc6.img 检查SELinux现时况态 要知到你现在是否使用 SELinux: # getenforce
disabled

如何查看,关闭和开启selinux的更多相关文章

  1. SELinux的关闭与开启

    SELinux是美国国家安全局对于强制访问控制的实现,是NSA在Linux社区的帮助下开发的一种访问控制体系,所以SELinux可以看做是安全强化的Linux子系统,和防火墙有相似点,作用之一是保证计 ...

  2. CentOS SELinux服务关闭与开启

    查看SElinux是否开启  查看是否开启SELinux,如果是未开启则是diabled,enforcing(enforce的分词,正在执行的意思),表明开启   #getenforce  临时关闭S ...

  3. 查看程序是否启动或者关闭--比如查看Tomcat是否开启!直接用ps命令查看进程就行了啊

    1.查看程序是否启动或者关闭--比如查看Tomcat是否开启!直接用ps命令查看进程就行了啊 2.Tomcat服务器和虚拟机的关系,Tomcat启动运行过程要调用系统环境变量的java_home啊,J ...

  4. Linux分区方式及关闭iptables和selinux的方式

    分区方式一般有三种 第一种:数据不是很重要 /boot(系统的引导分区): 系统引导的信息/软件 系统的内核   200M swap( 交换分区): 为了避免系统内存用光了导致系统 宕机 如果系统内存 ...

  5. CentOS 7.5关闭FireWall 和SELinux图文详解

    CentOS 7.5关闭FireWall 和SELinux图文详解 1. 环境 CentOS 7.5 2. 关闭FireWall和SELinux 2.1 FireWall 使用systemctl st ...

  6. centos7开启3306端口,liunx查看防火墙是否开启

    Can't connect to MySQL server on localhost (10061)这个就属于下面要说的情况 启动服务 systemctl start mariadb.service ...

  7. fedora 关闭、禁止selinux

    Fedora关闭/禁用SELinux三种方法 在Fedora中有时候我们想关闭SELinux,因为有时候本是合法的操作也总是弹出窗口阻止我们的操作.下面介绍三种方法来关闭/禁用SELinux. 1.在 ...

  8. [Linux]防火墙关闭与开启

    防火墙关闭与开启 系统环境:ubuntu16.04 工具:xshell 测试远程主机的端口是否开启 telnet 192.168.xx.xx 80 防火墙关闭/开启/重启 # 防火墙关闭 sudo u ...

  9. CentOS7 关闭防火墙和selinux

    本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...

随机推荐

  1. 【转】Kali Linux 新手折腾笔记

    原作者:http://defcon.cn/1618.html 最近在折腾Kali Linux 顺便做一简单整理,至于安装就不再多扯了,估计会出现的问题上一篇文章<VMware虚拟机安装Kali ...

  2. ettercap

    作者: 官网:http://ettercap.github.io/ettercap/ 源码:https://github.com/Ettercap/ettercap 功能:arp欺骗

  3. 5.mybatis一对一表关联查询

    方式一:嵌套结果:使用嵌套结果映射来处理重复的联合结果的子集,封装联表查询的数据(去除重复的数据)  SELECT * FROM class c,teacher t WHERE c.tid = t.t ...

  4. Windows Internals学习笔记(二)系统架构

    参考资料: 1. <Windows Internals> 2. http://bestcbooks.com 3. Windows Drive Kit 4. Microsoft Window ...

  5. Nemerle Quick Guide

    This is a quick guide covering nearly all of Nemerle's features. It should be especially useful to a ...

  6. iOS - UIImagePickerController

    前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIImagePickerController : UINavigationController <NSCod ...

  7. oracle 10g正则表达式 REGEXP_LIKE 用法

    ORACLE中的支持正则表达式的函数主要有下面四个:1,REGEXP_LIKE :与LIKE的功能相似2,REGEXP_INSTR :与INSTR的功能相似3,REGEXP_SUBSTR :与SUBS ...

  8. 工作流学习——重要概念扫盲篇一步曲 (zhuan)

    http://blog.csdn.net/zwk626542417/article/details/46592471 ***************************************** ...

  9. aspx后缀映射成html

    1.网站的配置文件添加如下代码: <configuration> <configSections> <section name="RewriterConfig& ...

  10. djangoadmin导出csv

    from django.contrib import admin from .models import Order,OrderItem from django.http import HttpRes ...