How to close SELinux-linux operation and maintenance

How to close SELinux 1. Temporarily close SELinux Recommended learning: Linux video setenforce 0 ##Set SELinux to become permissive mode ##setenforce 1 Set SELinux to become enforcing mode 2, permanently close SELinux Modify /etc/selinux/config file Change SELINUX=enforcing to SELINUX=disabled and restart the machine. 3. View SELinux status ◆ /usr/sbin/sestatus -v If the SELinux status parameter is enabled, it is enabled SELinux status: enabled ◆ getenforce can also use this command to check SELinux is the enforcement provided in the 2.6 version of the Linux kernel Access Control (MAC) system. The access of any process must pass the rule check defined in selinux, and the access can only be accessed if it passes. It is the most outstanding new security subsystem in the history of Linux. For more related tutorials, please pay attention to PHP Chinese website! The above is the detailed content of how to close SELinux, please pay attention to other related articles on 1024programmer.com for more information!

How to close selinux-linux operation and maintenance

How to close selinux? Close selinux 1. Get the status of selinux through the command “getenforce”, Recommended: “Linux Tutorial》 [root@localhost ~]# getenforce Enforcing //enforcing means open, [root@localhost ~]# getenforce Permissive // ​​permissive means warning [root@localhost ~]# getenforce Disabled //disabled means off [root@localhost ~]# 2. You can close selinux by entering commands in the terminal. This method is only temporarily closed and has no effect after restarting [root@localhost ~]# setenforce 0 //close [root@localhost ~]# getenforce Permissive [root@localhost ~]# setenforce 1 //Open [root@localhost ~]# getenforce Enforcing 3. Modify the selinux state through the configuration file “/etc/sysconfig/selinux”, this method needs to restart the machine [root@localhost ~]# gedit /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 – No SELinux policy is loaded. SELINUX=disabled 4. Close selinux by modifying “/boot/grub/menu.lst”, so that selinux will not be started every time you boot [root@localhost ~]# gedit /boot/grub/menu.lst default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hidden menu title CentOS (2.6.32-431.el6.i686) root (hd0,0) kernel /vmlinuz-2.6.32-431.el6.i686 ro root=/dev/mapper/VolGroup-lv_root nomodeset rd_NO_LUKS rd_NO_MD rd_LVM_LV=VolGroup/lv_swap crashkernel=auto vga=ask.UTF-8 rd_LVM_LV=VolGroup/lv_root KEYBO ARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet selinux=0…

How to close selinux-linux operation and maintenance

、 How to close selinux? Close SELinux: 1. Temporary shutdown (no need to restart the machine): setenforce 0 ##Settings SELinux becomes permissive mode ##setenforce 1 Set SELinux to become enforcing mode 2. To modify the configuration file, you need to restart the machine: Modify /etc/selinux/config File Change SELINUX=enforcing to SELINUX=disabled Restart the machine Recommended tutorial: “Linux Tutorial” The above is how to close selinux For more details, please pay attention to other related articles on 1024programmer.com!

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索