1. 程式人生 > >在CentOS/RHEL 7.X安裝 EPEL repo 的方法

在CentOS/RHEL 7.X安裝 EPEL repo 的方法

x86 mirror idc 查看 fusion mir 版本 repo 三方

在CentOS/RHEL 7.X安裝 EPEL repo 的方法

一 背景

RHEL以及他的衍生發行版如CentOS、Scientific Linux為了穩定,官方的rpm repository提供的rpm包往往是很滯後的,而EPEL恰恰可以解決這兩方面的問題。EPEL的全稱叫 Extra Packages for Enterprise Linux 。EPEL是由 Fedora 社區打造,為 RHEL 及衍生發行版如 CentOS、Scientific Linux 等提供高質量軟件包的項目。裝上了 EPEL之後,就相當於添加了一個第三方源。在某些情況下,通過 EPEL repo 安裝一些軟件比其他安裝方式方便很多。

眾所周知,rpmfusion.org 主要為桌面發行版提供大量rpm包,而EPEL則為服務器版本提供大量的rpm包,而且大多數rpm包在官方 repository 中是找不到的。絕大多數rpm包要比官方 repository 的rpm包版本要新。

二 操作步驟

2.1 執行安裝命令

yum -y install epel-release

2.2 查看結果

yum repolist
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ap.stykers.moe
 * epel: mirror01.idc.hinet.net
 * extras: mirrors.cn99.com
 * updates: mirrors.njupt.edu.cn
repo id                                                              repo name                                                                                           status
base/7/x86_64                                                        CentOS-7 - Base                                                                                     10019
*epel/x86_64                                                         Extra Packages for Enterprise Linux 7 - x86_64                                                      12973
extras/7/x86_64                                                      CentOS-7 - Extras                                                                                     371
updates/7/x86_64                                                     CentOS-7 - Updates                                                                                   1163
repolist: 24526

我們可以與安裝之前對比一下:

yum repolist
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.nwsuaf.edu.cn
 * extras: mirrors.nwsuaf.edu.cn
 * updates: mirrors.nwsuaf.edu.cn
repo id                                                                            repo name                                                                             status
base/7/x86_64                                                                      CentOS-7 - Base                                                                       10019
extras/7/x86_64                                                                    CentOS-7 - Extras                                                                       371
updates/7/x86_64                                                                   CentOS-7 - Updates                                                                     1163
repolist: 11553

效果不言而喻。

2.3 其他安裝方式

通過 rpm 包可以安裝,下載地址如下:<https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm>

在CentOS/RHEL 7.X安裝 EPEL repo 的方法