How To Install mod_selinux on Fedora 36
Introduction
In this tutorial we learn how to install mod_selinux on Fedora 36.
What is mod_selinux
The Apache/SELinux plus is an extra module (mod_selinux.so) which enables to launch contents-handler (it means both of references to static contents and invocations of web applications) with individual and restrictive privileges set, based on http authentication. The mod_selinux.so generates a one-time worker thread for each request, and it assigns the worker restrictive domain based on the authentication prior to launching contents handlers. It means we can apply valid access controls on web-applications, and makes assurance operating system can prevent violated accesses, even if web application contains security bugs or vulnerabilities.
We can use yum or dnf to install mod_selinux on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install mod_selinux.
Install mod_selinux on Fedora 36 Using dnf
Update yum database with dnf using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install mod_selinux using dnf by running the following command:
sudo dnf -y install mod_selinux
Install mod_selinux on Fedora 36 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
After updating yum database, We can install mod_selinux using yum by running the following command:
sudo yum -y install mod_selinux
How To Uninstall mod_selinux on Fedora 36
To uninstall only the mod_selinux package we can use the following command:
sudo dnf remove mod_selinux
mod_selinux Package Contents on Fedora 36
/etc/httpd/conf.d/mod_selinux.conf
/etc/httpd/conf.modules.d/10-mod_selinux.conf
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/d4c61fa3f3f11ecce2cdb88da116180bf998c1
/usr/lib64/httpd/modules/mod_selinux.so
/usr/share/doc/mod_selinux
/usr/share/doc/mod_selinux/LICENSE
/usr/share/doc/mod_selinux/README
/usr/share/selinux/packages/mod_selinux.minimum.pp
/usr/share/selinux/packages/mod_selinux.mls.pp
/usr/share/selinux/packages/mod_selinux.targeted.pp
References
Summary
In this tutorial we learn how to install mod_selinux on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).