epel,即“extra packages for enterprise linux”,是一个为 centos 和 rhel 服务器提供的自由开源附加软件包仓库。正如其名,epel 仓库提供了一些在 centos 8 和 rhel 8 默认软件包仓库中找不到的额外软件包。本文将指导您如何在 centos 8 和 rhel 8 服务器上启用和使用 epel 存储库。
EPEL 仓库的先决条件
在 RHEL 8.x 服务器上安装并启用 EPEL 仓库
首先,通过登录或使用 SSH 连接到您的 RHEL 8.x 服务器,然后执行以下 dnf 命令来安装 EPEL rpm 包:
[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf install https://www.php.cn/link/ff67b4f15981e27c157d955922c4e509 -y
执行上述命令后,输出将类似于以下内容:

EPEL rpm 包安装成功后,它会自动启用并配置其 yum/dnf 仓库。为了验证 EPEL 仓库是否已启用,请运行以下 dnf 或 yum 命令:
[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf repolist epel 上次元数据过期检查:0:27:27 前,执行于 2020年03月08日 星期日 07时40分47秒。 仓库标识 仓库名称 状态 *epel Extra Packages for Enterprise Linux 8 - x86_64 4,969
或者:
[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf repolist epel -v 加载插件:builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync DNF version: 4.2.7

在 CentOS 8.x 服务器上安装并启用 EPEL 仓库
接下来,登录或通过 SSH 连接到您的 CentOS 8 服务器,并执行以下 dnf 或 yum 命令来安装 epel-release rpm 软件包。在 CentOS 8 服务器中,EPEL rpm 包已包含在其默认软件包仓库中。
[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf install epel-release -y
或者:
[root@localhost /home/linuxidc/www.linuxidc.com]$ yum install epel-release -y

执行以下命令来检查 CentOS 8 服务器上 EPEL 仓库的状态:
[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf repolist epel 上次元数据过期检查:0:29:53 前,执行于 2020年03月08日 星期日 07时40分47秒。 仓库标识 仓库名称 状态 *epel Extra Packages for Enterprise Linux 8 - x86_64 4,969

[root@localhost /home/linuxidc/www.linuxidc.com]$ dnf repolist epel -v

以上就是CentOS 8 和 RHEL 8 服务器上启用 EPEL 仓库方法的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号