Introduction
In this tutorial we learn how to install checkpolicy
on CentOS 8.
What is checkpolicy
Security-enhanced Linux is a feature of the Linuxxae 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 Enforcementxae, 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 CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install checkpolicy.
Install checkpolicy on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install checkpolicy
using dnf
by running the following command:
sudo dnf -y install checkpolicy
Install checkpolicy on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
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 CentOS 8
To uninstall only the checkpolicy
package we can use the following command:
sudo dnf remove checkpolicy
checkpolicy Package Contents on CentOS 8
/usr/bin/checkmodule
/usr/bin/checkpolicy
/usr/bin/sedismod
/usr/bin/sedispol
/usr/lib/.build-id
/usr/lib/.build-id/55
/usr/lib/.build-id/55/996cd9e8dafce5b381ab3727524a50f9214418
/usr/lib/.build-id/89
/usr/lib/.build-id/89/c8a4c23adaaa635f459e35709ef895575d8b82
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/a8e5013526fc4b46d001c285157808a1087dfc
/usr/lib/.build-id/e4
/usr/lib/.build-id/e4/6a29270f3f24f5948dde3654e8774ae7b6ba08
/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 CentOS 8 using yum and dnf.