CentOS7/RHEL7安装EPEL步骤详解

作者:袖梨 2022-06-30


EPEL,即Extra Packages for Enterprise Linux的简称,是为企业级Linux提供的一组高质量的额外软件包,包括但不限于Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Enterprise Linux (OEL)。(关于 : EPEL)

为CentOS7/RHEL7安装EPEL 仓库(repo)

方法一:命令安装


[root@idoseek ~]# yum -y install epel-release
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.unifiedlayer.com
 * extras: mirrors.kernel.org
 * updates: mirrors.syringanetworks.net
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-2 将被 安装
--> 解决依赖关系完成
 
依赖关系解决
 
====================================================================================================
 Package                     架构                  版本                 源                     大小
====================================================================================================
正在安装:
 epel-release                noarch                7-2                  extras                 13 k
 
事务概要
====================================================================================================
安装  1 软件包
 
总下载量:13 k
安装大小:22 k
Downloading packages:
epel-release-7-2.noarch.rpm                                                  |  13 kB  00:00:00    
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : epel-release-7-2.noarch                                                         1/1
  验证中      : epel-release-7-2.noarch                                                         1/1
 
已安装:
  epel-release.noarch 0:7-2                                                                        
 
完毕!
[root@idoseek ~]#

方法二:手动安装

针对系统架构选择相应的类型:http://dl.fedoraproject.org/pub/epel/7/。我们使用的x86_64,就要进入该目录下寻找相应包,安装方法如下:


# rpm -vih http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
或者:


# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
# rpm -vih epel-release-7-2.noarch.rpm

更新包缓存

此时我们发现/etc/yum.repos.d/下多了两个epel的repo文件:


[root@idoseek ~]# ll /etc/yum.repos.d/
总用量 28
-rw-r--r-- 1 root root 1664 8月  22 12:21 CentOS-Base.repo
-rw-r--r-- 1 root root  649 8月  22 12:21 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root  290 8月  22 12:21 CentOS-fasttrack.repo
-rw-r--r-- 1 root root 1331 8月  22 12:21 CentOS-Sources.repo
-rw-r--r-- 1 root root  156 8月  22 12:21 CentOS-Vault.repo
-rw-r--r-- 1 root root  957 9月   2 12:14 epel.repo
-rw-r--r-- 1 root root 1056 9月   2 12:14 epel-testing.repo

更新元数据缓存:

[root@idoseek ~]# yum clean all && yum makecache

相关文章

精彩推荐