SEmanage is a command-line
utility and provide ability to manage SELinux contexts. Its needs separate
installation by default this package is not available in CentOS 8
minimal installations.
[root@linuxcnf ~]# semanage -h
-bash: semanage: command not found
[root@linuxcnf ~]#
|
As per the above output,
the package is not installed on the system which provides semanage command. Follow
the below steps to resolve:
Step 1. Search the Package: Run the following command to search the correct
package name for SEmanage command:
[root@linuxcnf ~]# dnf provides semanage
Last metadata expiration check:
0:17:39 ago on Tue 11 Jan 2022 05:41:37 AM EST.
policycoreutils-python-utils-2.9-16.el8.noarch
: SELinux policy core python
: utilities
Repo : @System
Matched from:
Filename : /usr/sbin/semanage
policycoreutils-python-utils-2.9-16.el8.noarch : SELinux policy core python
: utilities
Repo : baseos
Matched from:
Filename : /usr/sbin/semanage
[root@linuxcnf ~]#
|
In the above output the “policycoreutils-python-utils”
package provides SEmanage command.
Step 2. Package Installation: Run the following command to install require package:
[root@linuxcnf ~]# dnf install
policycoreutils-python-utils -y
……………………..
Installed:
checkpolicy-2.9-1.el8.x86_64
policycoreutils-python-utils-2.9-16.el8.noarch
……………………..
Complete!
[root@linuxcnf ~]#
|
Step 3. Validate the Installation: Run the following command to validate the
installation:
[root@linuxcnf ~]# semanage -h
usage: semanage [-h]
………….
optional arguments:
-h, --help show this help message and exit
[root@linuxcnf ~]#
|
No comments:
Post a Comment