How to reinstall Selinux is a Security module made for Linux kernel in order to provide Enhanced Security to Operating Systems. By Default, Selinux Linux is in Enforcing mode. We can uninstall or install SELinux when it’s not working in centos Linux.
Sometimes you will face the SELinux issue at the boot time, then you have to reinstall it and also update the label and reboot the machine.
There are two modes in Selinux:
- Enforcing mode
- Permissive mode
Check Out: How To Disable SELinux
How To Reinstall Selinux Security Policy:
Permissive mode basically used for troubleshooting at OS level. To set Permissive mode you have to go the location which mentioned below
Configuration file location /etc/sysconfig/selinux
Here You will have to edit this file and set the Selinux = Permissive And more in detail if you set to disable the Selinux You have to reboot the machine It’s mandatory to reload the changes.
Check Out: Selinux Semanage Command Not found
Install Selinux Policy
Run following Commands on Server
- yum reinstall selinux-policy-targeted
- touch /.autorelabel
- systemctl reboot so
After rebooting, You have to check the Selinux status. so
Command is sestatus
That’s it. install selinux linux path not working indows 10 uninstall centos