setenforce 0 关闭SELinux

setenforce 1 临时打开SELinux

getenforce 查看SELinux状态

永久关闭SELinux :

# 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
# SELINUXTYPE= can take one of these two values:
# default - equivalent to the old strict and targeted policies
# mls - Multi-Level Security (for military and educational use)
# src - Custom policy built from source
#SELINUXTYPE=default
#SELINUXTYPE=ubuntu
SELINUXTYPE=g6s-policy # SETLOCALDEFS= Check local definition changes
SETLOCALDEFS= 上面改为SELINUX=disabled #可以关闭selinux,免得每次启动都要setenforce 0关闭selinux

查看selinux策略

# sestatus
SELinux status: enabled 若上面将SELINUX改为disabled,这里就是disabled,getenforce也是
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux 相关的配置等文件会放在这里面
Loaded policy name: my-policy
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: disabled
Policy deny_unknown status: denied
Memory protection checking: actual (secure)
Max kernel policy version:

selinux操作的更多相关文章

  1. Linux setenforce命令详解[SeLinux操作]

    SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统. 关闭SELinux 临时生效: 命令临时 ...

  2. Linux的selinux

    SELinux 操作模式     学科 (Subject):SELinux 序,因此你能够将『主体』跟 process 划上等号:     目标 (Object): 主体程序是否能存取的『目标资源』一 ...

  3. 二十九、SELinux简介

    一.基础 1)访问模型 Linux原有访问模型:自主访问控制 DAC 安全隐患: 进程所能访问资源的范围 为用户所能访问的资源范围 后门: rootkit程序 进程被胁持: 基于进程作为跳板,就有了进 ...

  4. php扩展redis链接失败,返回false

    刚开始接触redis,发现一直返回false,其实只要关闭防火墙就可以连接成功了. 关闭selinux操作   方法1:修改grub.conf将参数selinux=1修改为等于selinux=0,这个 ...

  5. CentOS7——搭建LNMP环境(WordPress案例)

    CentOS7--搭建LNMP环境(WordPress案例) LNMP组成介绍 LNMP(Linux-Nginx-MySQL-PHP)网站架构是目前国际流行的Web框架,该框架包括:Linux操作系统 ...

  6. 华为云服务器安装hadoop2.7.5

    1. 安装环境 1.1硬件环境 1.1.1 NameNode 配置项 详细参数 主机 k8s-master CPU Intel(R) Xeon(R) Gold 6278C CPU @ 2.60GHz ...

  7. 手把手教你在命令行(静默)部署oracle 11gR2

    文章目录 环境介绍 linux发行版 cpu.内存以及磁盘空间 敲黑板 关闭防火墙以及selinux 操作系统配置 使用阿里的yum源提速 安装依赖软件 设置用户最大进程数以及最大文件打开数 内核参数 ...

  8. Linux SELinux 使用操作

    Linux SELinux 使用操作 # 修改 SELinux 启动模式.临时生效 命令:setenforce [0|1] 0:转成 permissive 宽容模式: 1:转成 Enforcing 强 ...

  9. SElinux用户管理操作

    查看当前用户上下文 id -Z 查看登陆的用户和其对应的SELinux用户 semanage login -l 改变用户和SELinux的对应关系 semanage login -a选项能改变,-s用 ...

随机推荐

  1. English trip -- VC(情景课) 7 D Reading 阅读练习

    Read Hi patty, This morning, Smuel and I are going to The Clothes place. Samuel needs blue pants.He ...

  2. UVA-10692 Huge Mods

    题目大意:计算a1^a2^a3^a4......^an模m的值. 题目解析:幂取模运算的结果一定有周期.一旦找到周期就可把高次幂转化为低次幂.有降幂公式 (a^x)%m=(a^(x%phi(m)+ph ...

  3. Activiti工作流笔记(1)

    Activiti下载地址: eclipse的activiti插件下载地址:http://www.activiti.org/designer/archived/activiti-designer-5.1 ...

  4. VAE demo

    先看tflearn 官方的: from __future__ import division, print_function, absolute_import import numpy as np i ...

  5. Python将列表作为栈和队列

    Collections中的各种方法 阅读目录(Content) 一.各种方法介绍 二.代码部分 回到顶部(go to top) 一.各种方法介绍 Counter 统计个数   elements  mo ...

  6. UVALive 4490 压缩DP

    转载自http://blog.csdn.net/zstu_zlj/article/details/9903589 没有接触过压缩DP.位运算也不太熟.所以理解了思路还是不懂代码.

  7. WEBSERVICE-CXF服务端代码

    Spring + cxf 发布webservice 依赖的jar包 WEB.xml的配置 applicationContext.xml配置   部署在Tomcat中启动   出现的问题         ...

  8. Flask初级(十)flash与前台交互post详解

    Project name :Flask_Plan templates:templates static:static POST提交方式,首先要有表单 老实去改模板文件吧. 查询窗口我准备放在页面最顶上 ...

  9. Java——String类

    body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...

  10. hdu 1159 Common Subsequence (最长公共子序列 +代码)

    Problem Description A subsequence of a given sequence is the given sequence with some elements (poss ...