semanage (Herramienta de administración de políticas de SELinux) se utiliza para configurar ciertas partes de la política de SELinux sin necesidad de modificar o volver a compilar las fuentes de políticas.
Esta publicación lo ayudará a instalar los paquetes necesarios para obtener el comando semanage.
Veamos qué paquete nos proporciona el comando semanage usando el comando YUM.
yum whatprovides semanage
O
yum provides *bin/semanage
Salida:
Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 1.4 MB/s | 7.6 MB 00:05 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 1.3 MB/s | 4.7 MB 00:03 Last metadata expiration check: 0:00:05 ago on Wed 17 Jul 2019 06:34:12 AM EDT. policycoreutils-python-utils-2.8-16.1.el8.noarch : SELinux policy core python utilities Repo : rhel-8-for-x86_64-baseos-rpms Matched from: Filename : /usr/sbin/semanageEl resultado anterior le dice que el paquete policycoreutils-python-utils le proporciona el comando semanage.
Ahora, instale el paquete policycoreutils-python-utils usando el comando YUM.
yum install -y policycoreutils-python-utils
Salida:
Updating Subscription Management repositories. Last metadata expiration check: 0:01:39 ago on Wed 17 Jul 2019 06:34:12 AM EDT. Dependencies resolved. ================================================================================================================== Package Arch Version Repository Size ================================================================================================================== Installing: policycoreutils-python-utils noarch 2.8-16.1.el8 rhel-8-for-x86_64-baseos-rpms 228 k Installing dependencies: python3-policycoreutils noarch 2.8-16.1.el8 rhel-8-for-x86_64-baseos-rpms 2.2 M python3-libsemanage x86_64 2.8-5.el8 rhel-8-for-x86_64-baseos-rpms 127 k python3-setools x86_64 4.2.0-2.el8 rhel-8-for-x86_64-baseos-rpms 598 k checkpolicy x86_64 2.8-2.el8 rhel-8-for-x86_64-baseos-rpms 338 k python3-audit x86_64 3.0-0.10.20180831git0047a6c.el8 rhel-8-for-x86_64-baseos-rpms 85 k Transaction Summary ================================================================================================================== Install 6 Packages Total download size: 3.6 M Installed size: 9.9 M Downloading Packages: (1/6): python3-setools-4.2.0-2.el8.x86_64.rpm 372 kB/s | 598 kB 00:01 (2/6): python3-libsemanage-2.8-5.el8.x86_64.rpm 69 kB/s | 127 kB 00:01 (3/6): python3-policycoreutils-2.8-16.1.el8.noarch.rpm 1.1 MB/s | 2.2 MB 00:02 (4/6): python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64.rpm 170 kB/s | 85 kB 00:00 (5/6): checkpolicy-2.8-2.el8.x86_64.rpm 437 kB/s | 338 kB 00:00 (6/6): policycoreutils-python-utils-2.8-16.1.el8.noarch.rpm 691 kB/s | 228 kB 00:00 ------------------------------------------------------------------------------------------------------------------ Total 1.5 MB/s | 3.6 MB 00:02 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64 1/6 Installing : checkpolicy-2.8-2.el8.x86_64 2/6 Installing : python3-setools-4.2.0-2.el8.x86_64 3/6 Installing : python3-libsemanage-2.8-5.el8.x86_64 4/6 Installing : python3-policycoreutils-2.8-16.1.el8.noarch 5/6 Installing : policycoreutils-python-utils-2.8-16.1.el8.noarch 6/6 Running scriptlet: policycoreutils-python-utils-2.8-16.1.el8.noarch 6/6 Verifying : python3-policycoreutils-2.8-16.1.el8.noarch 1/6 Verifying : python3-libsemanage-2.8-5.el8.x86_64 2/6 Verifying : python3-setools-4.2.0-2.el8.x86_64 3/6 Verifying : checkpolicy-2.8-2.el8.x86_64 4/6 Verifying : python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64 5/6 Verifying : policycoreutils-python-utils-2.8-16.1.el8.noarch 6/6 Installed products updated. Installed: policycoreutils-python-utils-2.8-16.1.el8.noarch python3-policycoreutils-2.8-16.1.el8.noarch python3-libsemanage-2.8-5.el8.x86_64 python3-setools-4.2.0-2.el8.x86_64 checkpolicy-2.8-2.el8.x86_64 python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64 Complete!
Una vez completada la instalación, ejecute el semanage para ver si está disponible o no.
semanage -h
Eso es todo.