、查看当前selinux的状态命令为
getenforce 、两个都要关。注意先看看有么有这两个文件,如果没有就创建一个,否则后期会出现很多问题 cat > /etc/selinux/config << EOF
# 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=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
EOF sed -i 's/enforcing/disabled/g' /etc/selinux/config sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux 、再次查看当前selinux的状态命令为
getenforce

正确关闭selinux的更多相关文章

  1. Linux下开启关闭SeLinux

    SELinux (Security-Enhanced Linux) in Fedora is an implementation of mandatory access control in the ...

  2. zabbix安装,关闭SELinux

    一.缘由 在安装zabbix的时候,按照官网的Zabbix Manual一路跑下来,zabbix的dashboard提示:zabbix server is not running the inform ...

  3. 如何关闭SELinux

    一般安装linux课程时都把SELinux与iptables安排在后面,使初学者配置linux服务器时不成功,却没有头绪,那是因为在RedHat linux操作系统中默认开启了防火墙,SELinux也 ...

  4. Redhat Enterprise Linux中如何关闭SELinux?

    转自http://www.cnitblog.com/lywaml/archive/2005/06/21/468.html 红帽企业 Linux 4 包括了一个 SELinux 的实现.SELinux ...

  5. linux 为什么要关闭selinux

    一般安装linux课程时都把SELinux与iptables安排在后面,使初学者配置linux服务器时不成功,却没有头绪,那是因为在RedHat linux操作系统中默认开启了防火墙,SELinux也 ...

  6. 关闭selinux

    1.查看SELinux状态:getenforce Enforcing(启动) disable(禁用) 1.禁用SELinux(重启后依然生效) 修改 vi /etc/sysconfig/selinux ...

  7. 关闭SELinux和iptables防火墙

    1.关闭SELinux: 编辑SELinux配置文件: [root@Redis selinux]# vim /etc/selinux/config 修改SELINUX配置项为disable SELIN ...

  8. 开发thinkphp的第一步就是给Application目录(不包括其下的文件)777权限, 关闭selinux

    开发thinkphp的时候, 总是会出现各种个样 的奇怪的毛病, 比如: 说什么Application目录不可写, 比如: 说什么 _STORAGE_WRITE_ERROR, 不能生成 Runtime ...

  9. 查看/关闭SElinux (原创帖,转载请注明出处)

    查看SELinux状态: 1   /usr/sbin/sestatus -v | grep "SELinux status:" ##如果SELinux status参数为enabl ...

随机推荐

  1. Mongodb操作-更新操作符

    1.$inc 用法:{$inc:{field:value}} 作用:对一个数字字段的某个field增加value 示例:将name为chenzhou的学生的age增加5 > db.student ...

  2. Linux系统服务器 GNU Bash 环境变量远程命令执行漏洞修复命令

    具体方法就是在ssh上执行 yum update bash 完成后重启VPS.

  3. tensorflow以文件形式运行程序实例

    在命令行中进入到代码所在文件夹 执行python mnist2.p或python aaa/mnist2.py这种形式

  4. VScode VUE+PYTHON习惯用的编辑器

    本人从事运维开发工作,经常要开发一些web系统工具,这就需要用到前后端开发.vscode是我用得最舒服的一种编辑器,前端后端都习惯在上面写,这里记录一些配置. 一,插件安装 目前我最主要用的是:    ...

  5. java web 域对象

    四大域对象 pagecontext  表示的是当前页面的域对象Request表示的是请求域中的对象session  表示的是一次会话中的对象application表示的是在一次tc启动到一次关闭的时候 ...

  6. 轮子:读取config.ini文件

    python: 把config.ini文件成map返回 def get_conf(conf_file): conf = {} ll=list(map(lambda x: x.replace('&quo ...

  7. 【winfrom-右击快捷菜单】右击或左击时显示快捷菜单

    拖个contextMenuStrip控件 按钮的MouseDown事件: private void treeView1_MouseDown(object sender, MouseEventArgs ...

  8. vs2017 2019 下载更新慢的解决方法

    国庆期间 下载的速度只有20多kb. 1.去掉网络适配器里面的 ip6勾选. 2.修改电脑的自动dns, 修改为1.1.1.1  , 修改为8.8.8.8  更快. 记得禁用再启用网络: dns为1. ...

  9. testNG之测试报告

    原文:https://www.cnblogs.com/yuan-yuan/p/4503524.html 测试报告 执行完测试用例之后,会在项目的test-output(默认目录)下生成测试报告 打开i ...

  10. 【杂题】[LibreOJ #6608] 无意识的石子堆【容斥原理】【FFT】

    Description Solution 943718401=225*2^22+1 显然每行必须有两个,我们不妨枚举有k列有2个石子,那么有2(n-k)列有1个石子. \[Ans=\sum\limit ...