CentOS7/RHEL7安装EPEL扩展仓库步骤详解

CentOS7/RHEL7安装EPEL扩展仓库步骤详解

使用yum安装软件,提示没有可用的软件包.

分析发现其系统中没有安装EPEL 扩展仓库
原因解析( EPEL 扩展仓库)
EPEL 是 yum 的一个软件源, 里面包含了许多基本源里没有的软件了, 但在我们在使用 epel 时是需要安装它才可以了,

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

于是执行命令
yum install epel-release
提示没有epel-release包,只能手动安装

下载wget
yum install -y wget

备份系统原有yum源

[root@sunny yum.repos.d]# mv *.repo repo_bak/
mv:是否覆盖"repo_bak/CentOS-Base.repo"? y
mv:是否覆盖"repo_bak/redhat.repo"? y

针对系统架构选择相应的类型 : http://dl.fedoraproject.org/pub/epel/7/

我们使用的 x86_64, 就要进入该目录下寻找相应包, 安装方法如下 :

[root@sunny yum.repos.d]# rpm -vih http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
获取http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
警告:/var/tmp/rpm-tmp.PZ7TRg: 头V4 RSA/SHA256 Signature, 密钥 ID 352c64e5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:epel-release-7-14                ################################# [100%]
[root@sunny yum.repos.d]# yum clean all
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
正在清理软件源: epel
[root@sunny yum.repos.d]# yum makecache
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
epel/x86_64/metalink                                     | 7.1 kB     00:00     
epel                                                     | 4.7 kB     00:00     
(1/6): epel/x86_64/group_gz                                |  96 kB   00:00     
(2/6): epel/x86_64/prestodelta                             |  935 B   00:00     
(3/6): epel/x86_64/other_db                                | 3.4 MB   00:01     
(4/6): epel/x86_64/updateinfo                              | 1.0 MB   00:03     
(5/6): epel/x86_64/filelists_db                            |  12 MB   00:39     
epel/x86_64/primary_db         FAILED                                           
https://linux.domainesia.com/fedora/fedora-epel/7/x86_64/repodata/e3b1189957a202fdb60540c6f8f95da600c1a7a73e2e6f084efa7d7bf56de48d-primary.sqlite.bz2: [Errno 12] Timeout on https://linux.domainesia.com/fedora/fedora-epel/7/x86_64/repodata/e3b1189957a202fdb60540c6f8f95da600c1a7a73e2e6f084efa7d7bf56de48d-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
(6/6): epel/x86_64/primary_db                              | 7.0 MB   00:04     
元数据缓存已建立

此时我们发现 /etc/yum.repos.d/ 下多了两个 epel 的 repo 文件:
epel.repo 和 epel-testing.repo
[root@sunny yum.repos.d]# ls
epel.repo  epel-testing.repo  redhat.repo  repo_bak

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值