How To Install checkpolicy on Rocky Linux 8

In this tutorial we learn how to install checkpolicy on Rocky Linux 8. checkpolicy is SELinux policy compiler

Introduction

In this tutorial we learn how to install checkpolicy on Rocky Linux 8.

What is checkpolicy

Security-enhanced Linux is a feature of the Linux® kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux. The Security-enhanced Linux kernel contains new architectural components originally developed to improve the security of the Flask operating system. These architectural components provide general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement®, Role-based Access Control, and Multi-level Security. This package contains checkpolicy, the SELinux policy compiler. Only required for building policies.

We can use yum or dnf to install checkpolicy on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install checkpolicy.

Install checkpolicy on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install checkpolicy using dnf by running the following command:

sudo dnf -y install checkpolicy

Install checkpolicy on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install checkpolicy using yum by running the following command:

sudo yum -y install checkpolicy

How To Uninstall checkpolicy on Rocky Linux 8

To uninstall only the checkpolicy package we can use the following command:

sudo dnf remove checkpolicy

checkpolicy Package Contents on Rocky Linux 8

/usr/bin/checkmodule
/usr/bin/checkpolicy
/usr/bin/sedismod
/usr/bin/sedispol
/usr/lib/.build-id
/usr/lib/.build-id/2e
/usr/lib/.build-id/2e/68d9112b32f833ccbde8564001882f5a1bb6c2
/usr/lib/.build-id/64
/usr/lib/.build-id/64/c9b3e4377407ca0a3860a3fa9283360197b11f
/usr/lib/.build-id/c4
/usr/lib/.build-id/c4/93b274cbb732e2709b4f40de854289e04d0518
/usr/lib/.build-id/cb
/usr/lib/.build-id/cb/426e5dc8ea34b9dea01c0974494881cc542c42
/usr/share/licenses/checkpolicy
/usr/share/licenses/checkpolicy/COPYING
/usr/share/man/man8/checkmodule.8.gz
/usr/share/man/man8/checkpolicy.8.gz
/usr/share/man/ru/man8/checkmodule.8.gz
/usr/share/man/ru/man8/checkpolicy.8.gz

References

Summary

In this tutorial we learn how to install checkpolicy on Rocky Linux 8 using yum and dnf.