Apache 配置 SELinux 命令的时候的命令 semanage

提示 -bash: semanage: command not found

的错误。

Apache 配置 SELinux 命令的时候的命令 semanage

semanage-01719×196 23.6 KB

这是因为你还没有安装 semanage

你可以 运行下面的命令进行安装 yum install policycoreutils-python

需要注意的是,如果你运行的是 fedora 31 或者比较高的版本的话,上面的安装可能装不上去,提示包没有找到的错误。

你可以尝试运行:dnf install policycoreutils-python-utils 进行安装。

Apache 配置 SELinux 命令的时候的命令 semanage

dnf install policycoreutils-python-utils-011643×857 246 KB

然后你可以运行 semanage -h 查看你的 semanage 是否已经在你的系统中安装完成了。

Apache 配置 SELinux 命令的时候的命令 semanage

如果确定安装完成了,你就可以开始进行设置了。

如果你不知道你的命令在哪个包中。

你可以使用命令进行查找。

比如说 yum provides semanage

policycoreutils-python-utils-2.9-5.fc31.noarch : SELinux policy core python utilities
Repo : fedora
Matched from:
Filename : /usr/sbin/semanage

Apache 配置 SELinux 命令的时候的命令 semanage

针对使用 yum 和 dnf 是一样的。

https://www.ossez.com/t/apache-selinux-semanage/90/2

相关推荐