歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

CentOS下徹底刪掉SElinux的方法

SELinux(Security-Enhanced Linux)安全增強式Linux,是一種強制訪問控制(mandatory access control)的實現。這這種控制下,linux有很多的操作是會被禁止或者是不成功的。之前試過為php配置Oracle支持的時候怎樣都弄不上去。後來把selinux干掉之後就完事了。好了,廢話少說,下面說一下徹底干掉selinux的方法。 

vim /etc/selinux/config  

打開selinux的配置文件,我們可以看selinux是默認開啟的:

  1. SELINUX=enforcing  

所以我們要修改的就是這個了,把原來的注釋掉,自己寫上

  1. SELINUX=disabled  

具體如下:

  1. # This file controls the state of SELinux on the system.  
  2. # SELINUX= can take one of these three values:  
  3. #       enforcing - SELinux security policy is enforced.  
  4. #       permissive - SELinux prints warnings instead of enforcing.  
  5. #       disabled - SELinux is fully disabled.  
  6. #SELINUX=enforcing  
  7.  SELINUX=disabled  
  8. # SELINUXTYPE= type of policy in use. Possible values are:  
  9. #       targeted - Only targeted network daemons are protected.  
  10. #       strict - Full SELinux protection.  
  11. SELINUXTYPE=targeted  

保存退出,然後重啟一下就ok了。

其實我們可以在裝完系統的時候馬上做好這個處理,以後就不會因一時想不起來而在那糾結了。

Copyright © Linux教程網 All Rights Reserved