How To Reinstall Selinux Security Policy On Redhat 7

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:

  1. Enforcing mode
  2. 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

  1. yum reinstall selinux-policy-targeted
  2. touch /.autorelabel
  3. 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

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment