企业 Linux (EPEL) 的额外软件包 是一个软件包存储库,它提供了标准 Rocky Linux / RHEL / CentOS 存储库中未包含的附加软件包。
Fedora 社区维护 EPEL 存储库。
本指南帮助您如何在 Rocky Linux 8 / CentOS 8 / RHEL 8 上启用 EPEL 存储库。
本文档也适用于 CentOS 7 RHEL 7
启用 EPEL 存储库
可以通过安装 EPEL 存储库配置 rpm 来启用 EPEL 存储库。
洛奇 Linux 8 / CentOS 8
dnf install -y epel-release
输出将如下所示
Last metadata expiration check: 0:17:48 ago on Sat 26 Jun 2021 05:46:56 AM UTC. Dependencies resolved. =================================================================================================================== Package Arch Version Repository Size =================================================================================================================== Installing: epel-release noarch 8-10.el8 extras 22 k Transaction Summary =================================================================================================================== Install 1 Package Total download size: 22 k Installed size: 30 k Downloading Packages: epel-release-8-10.el8.noarch.rpm 195 kB/s | 22 kB 00:00 ------------------------------------------------------------------------------------------------------------------- Total 16 kB/s | 22 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : epel-release-8-10.el8.noarch 1/1 Running scriptlet: epel-release-8-10.el8.noarch 1/1 Verifying : epel-release-8-10.el8.noarch 1/1 Installed: epel-release-8-10.el8.noarch Complete!
此外,启用 PowerTools 存储库,因为 EPEL 包可能依赖于它的包。
dnf config-manager --set-enabled PowerTools
RHEL 8
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
输出将如下所示
Last metadata expiration check: 0:17:48 ago on Sat 26 Jun 2021 05:46:56 AM UTC. epel-release-latest-8.noarch.rpm 15 kB/s | 21 kB 00:01 Dependencies resolved. =================================================================================================================== Package Arch Version Repository Size =================================================================================================================== Installing: epel-release noarch 8-10.el8 @commandline 21 k Transaction Summary =================================================================================================================== Install 1 Package Total size: 21 k Installed size: 30 k Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : epel-release-8-10.el8.noarch 1/1 Running scriptlet: epel-release-8-10.el8.noarch 1/1 Verifying : epel-release-8-10.el8.noarch 1/1 Installed: epel-release-8-10.el8.noarch Complete!
此外,在 RHEL 8 上启用代码就绪构建器存储库,因为 EPEL 包可能依赖于它的包。
ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
列出存储库
您可以在列表中找到 EPEL 存储库。
dnf repolist
输出将如下所示
repo id repo name appstream Rocky Linux 8 - AppStream baseos Rocky Linux 8 - BaseOS docker-ce-stable Docker CE Stable - x86_64 epel Extra Packages for Enterprise Linux 8 - x86_64 epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 extras Rocky Linux 8 - Extras
列出 EPEL 存储库上的可用包
dnf list available --disablerepo=* --enablerepo=epel
包列表将如下所示。
. . . . . . zork.x86_64 1.0.3-1.el8 epel zsh-syntax-highlighting.noarch 0.7.1-1.el8 epel zswap-cli.x86_64 0.5.0-1.el8 epel zvbi.x86_64 0.2.35-9.el8 epel zvbi-devel.x86_64 0.2.35-9.el8 epel zvbi-fonts.noarch 0.2.35-9.el8 epel
在 EPE 存储库上搜索包
您可以使用 搜索 或者 列表 使用 dnf 命令查找软件包的选项。
dnf search xrdp
或者
dnf list xrdp
输出:
Available Packages
xrdp.x86_64 1:0.9.16-1.el8 epel
从 EPEL 存储库安装软件包
从 EPEL 存储库安装软件包非常简单。 使用 dnf 命令安装软件包。
dnf install xrdp
结论
就这样。 我希望您已经学会了如何在 Rocky Linux 8 / CentOS 8 / RHEL 8 上启用 EPEL 存储库。请在评论部分分享您的反馈。