From 41f29169c4cc4a5de61b54e08309874ea1e78e84 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 4 Nov 2019 11:33:24 +0800 Subject: [PATCH] PRF @geekpi --- ...epository on CentOS 8 and RHEL 8 Server.md | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/translated/tech/20191013 How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server.md b/translated/tech/20191013 How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server.md index 9b0d320a79..6b1a42558d 100644 --- a/translated/tech/20191013 How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server.md +++ b/translated/tech/20191013 How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server) @@ -10,23 +10,21 @@ 如何在 CentOS 8 和 RHEL 8 服务器上启用 EPEL 仓库 ====== -**EPEL** 代表 “Extra Packages for Enterprise Linux”,它是一个免费的开源附加软件包仓库,可用于 **CentOS** 和 **RHEL** 服务器。顾名思义,EPEL 仓库提供了额外的软件包,它们在 [CentOS 8][1]和 [RHEL 8][2] 的默认软件包仓库中不可用。 +EPEL 代表 “Extra Packages for Enterprise Linux”,它是一个自由开源的附加软件包仓库,可用于 CentOS 和 RHEL 服务器。顾名思义,EPEL 仓库提供了额外的软件包,这些软件在 [CentOS 8][1] 和 [RHEL 8][2] 的默认软件包仓库中不可用。 -在本文中,我们将演示如何在 CentOS 8 和 RHEL 8 服务器上启用和使用 epel 存储库。 +在本文中,我们将演示如何在 CentOS 8 和 RHEL 8 服务器上启用和使用 EPEL 存储库。 -[![EPEL-Repo-CentOS8-RHEL8][3]][4] +![](https://img.linux.net.cn/data/attachment/album/201911/04/113307wz4y3lnczzlxzn2j.jpg) ### EPEL 仓库的先决条件 - * Minimal CentOS 8 和 RHEL 8 服务器 + * 最小化安装的 CentOS 8 和 RHEL 8 服务器 * root 或 sudo 管理员权限 * 网络连接 - - ### 在 RHEL 8.x 服务器上安装并启用 EPEL 仓库 -登录或 SSH 到你的 RHEL 8.x 服务器并执行以下 dnf 命令来安装 EPEL rpm 包, +登录或 SSH 到你的 RHEL 8.x 服务器,并执行以下 `dnf` 命令来安装 EPEL rpm 包, ``` [root@linuxtechi ~]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y @@ -34,9 +32,9 @@ 上面命令的输出将如下所示, -![dnf-install-epel-repo-rehl8][3] +![dnf-install-epel-repo-rehl8][5] -epel rpm 包成功安装后,它将自动启用并配置其 yum/dnf 仓库。运行以下 dnf 或 yum 命令,以验证是否启用了 EPEL 仓库, +EPEL rpm 包成功安装后,它将自动启用并配置其 yum/dnf 仓库。运行以下 `dnf` 或 `yum` 命令,以验证是否启用了 EPEL 仓库, ``` [root@linuxtechi ~]# dnf repolist epel @@ -44,11 +42,11 @@ epel rpm 包成功安装后,它将自动启用并配置其 yum/dnf 仓库。 [root@linuxtechi ~]# dnf repolist epel -v ``` -![epel-repolist-rhel8][3] +![epel-repolist-rhel8][6] ### 在 CentOS 8.x 服务器上安装并启用 EPEL 仓库 -登录或 SSH 到你的 CentOS 8 服务器,并执行以下 dnf 或 yum 命令来安装 “**epel-release**” rpm 软件包。在 CentOS 8 服务器中,epel rpm 在其默认软件包仓库中。 +登录或 SSH 到你的 CentOS 8 服务器,并执行以下 `dnf` 或 `yum` 命令来安装 `epel-release` rpm 软件包。在 CentOS 8 服务器中,EPEL rpm 在其默认软件包仓库中。 ``` [root@linuxtechi ~]# dnf install epel-release -y @@ -56,7 +54,7 @@ epel rpm 包成功安装后,它将自动启用并配置其 yum/dnf 仓库。 [root@linuxtechi ~]# yum install epel-release -y ``` -执行以下命令来验证 CentOS 8 服务器上 epel 仓库的状态, +执行以下命令来验证 CentOS 8 服务器上 EPEL 仓库的状态, ``` [root@linuxtechi ~]# dnf repolist epel @@ -82,11 +80,11 @@ Total packages: 1,977 [root@linuxtechi ~]# ``` -以上命令的输出说明我们已经成功启用了epel 仓库。 让我们在 EPEL 仓库上执行一些基本操作。 +以上命令的输出说明我们已经成功启用了 EPEL 仓库。让我们在 EPEL 仓库上执行一些基本操作。 -### 列出 epel 仓库种所有可用包 +### 列出 EPEL 仓库种所有可用包 -如果要列出 epel 仓库中的所有的软件包,请运行以下 dnf 命令, +如果要列出 EPEL 仓库中的所有的软件包,请运行以下 `dnf` 命令, ``` [root@linuxtechi ~]# dnf repository-packages epel list @@ -116,9 +114,9 @@ zvbi-fonts.noarch 0.2.35-9.el8 epel [root@linuxtechi ~]# ``` -### 从 epel 仓库中搜索软件包 +### 从 EPEL 仓库中搜索软件包 -假设我们要搜索 epel 仓库中的 Zabbix 包,请执行以下 dnf 命令, +假设我们要搜索 EPEL 仓库中的 Zabbix 包,请执行以下 `dnf` 命令, ``` [root@linuxtechi ~]# dnf repository-packages epel list | grep -i zabbix @@ -128,19 +126,21 @@ zvbi-fonts.noarch 0.2.35-9.el8 epel ![epel-repo-search-package-centos8][3] -### 从 epel 仓库安装软件包 +### 从 EPEL 仓库安装软件包 -假设我们要从 epel 仓库安装 htop 包,运行以下 dnf 命令, +假设我们要从 EPEL 仓库安装 htop 包,运行以下 `dnf` 命令, 语法: -# dnf –enablerepo=”epel” install <pkg_name> +``` +# dnf –enablerepo=”epel” install <包名> +``` ``` [root@linuxtechi ~]# dnf --enablerepo="epel" install htop -y ``` -**注意:**如果我们在上面的命令中未指定 “**–enablerepo=epel**”,那么它将在所有可用的软件包仓库中查找 htop 包。 +注意:如果我们在上面的命令中未指定 `–enablerepo=epel`,那么它将在所有可用的软件包仓库中查找 htop 包。 本文就是这些内容了,我希望上面的步骤能帮助你在 CentOS 8 和 RHEL 8 服务器上启用并配置 EPEL 仓库,请在下面的评论栏分享你的评论和反馈。 @@ -151,7 +151,7 @@ via: https://www.linuxtechi.com/enable-epel-repo-centos8-rhel8-server/ 作者:[Pradeep Kumar][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -161,3 +161,5 @@ via: https://www.linuxtechi.com/enable-epel-repo-centos8-rhel8-server/ [2]: https://www.linuxtechi.com/install-configure-kvm-on-rhel-8/ [3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 [4]: https://www.linuxtechi.com/wp-content/uploads/2019/10/EPEL-Repo-CentOS8-RHEL8.jpg +[5]: https://www.linuxtechi.com/wp-content/uploads/2019/10/dnf-install-epel-repo-rehl8.jpg +[6]: https://www.linuxtechi.com/wp-content/uploads/2019/10/epel-repolist-rhel8.jpg