How To Install selinux-policy.noarch on Amazon Linux 2

In this tutorial we learn how to install selinux-policy.noarch in Amazon Linux 2. selinux-policy.noarch is SELinux policy configuration

Introduction

In this tutorial we learn how to install selinux-policy.noarch on Amazon Linux 2.

What is selinux-policy.noarch

SELinux Reference Policy - modular. Based off of reference policy

We can use yum to install selinux-policy.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install selinux-policy.noarch.

Install selinux-policy.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install selinux-policy.noarch using yum by running the following command:

sudo yum -y install selinux-policy.noarch

How To Uninstall selinux-policy.noarch on Amazon Linux 2

To uninstall only the selinux-policy.noarch package we can use the following command:

sudo yum remove selinux-policy.noarch

selinux-policy.noarch Package Contents on Amazon Linux 2

/etc/selinux
/etc/selinux/config
/etc/sysconfig/selinux
/usr/lib/rpm
/usr/lib/rpm/macros.d
/usr/lib/rpm/macros.d/macros.selinux-policy
/usr/lib/systemd/scripts/amzn2-early-relabel-modules.sh
/usr/lib/systemd/system/amzn2-early-relabel-modules.service
/usr/lib/tmpfiles.d/selinux-policy.conf
/usr/share/selinux
/usr/share/selinux/packages

References

Summary

In this tutorial we learn how to install selinux-policy.noarch on Amazon Linux 2 using yum.