技术知识库

一、简介


EPEL是企业版 Linux 附加软件包的简称,EPEL是一个由Fedora特别兴趣小组创建、维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版(比如 CentOS、Scientific Linux、Oracle Enterprise Linux)的一个高质量附加软件包项目。


EPEL 的软件包通常不会与企业版 Linux 官方源中的软件包发生冲突,或者互相替换文件。EPEL 项目与 Fedora 基本一致,包含完整的构建系统、升级管理器、镜像管理器等等。


附EPEL官网:http://www.landui.com/wiki/EPEL/zh-cn


http://www.landui.com/fedora-epel/ rpm -Uvh http://www.landui.com


二、下载并安装EPEL


[root@localhost ~]# wget http://www.landui.com/pub/epel/epel-release-latest-7.noarch.rpm


[root@localhost ~]# rpm -ivh epel-release-latest-7.noarch.rpm


[root@localhost ~]# yum repolist      ##检查是否已添加至源列表

OK,检查好已添加至源后就可以进行yum安装了


RPM安装出现的错误:


错误:解压压缩文件 在文件/usr/share/doc/epel-release-7/GPL;55d6d507 失败:cpio: read 失败 - 没有该文件名或目录


出现该错误是由于下载的源文件出现错误,重新下载一遍就好了


另一种方法:

centos7的epel源

编辑/etc/yum.repos.d/epel.repo


[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch

#baseurl=http://www.landui.com/pub/epel/7/$basearch

mirrorlist=https://www.landui.com/metalink?repo=epel-7&arch=$basearch

failovermethod=priority

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug

#baseurl=http://www.landui.com/pub/epel/7/$basearch/debug

mirrorlist=https://www.landui.com/metalink?repo=epel-debug-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source

#baseurl=http://www.landui.com/pub/epel/7/SRPMS

mirrorlist=https://www.landui.com/metalink?repo=epel-source-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

CentOS6的请编辑/etc/yum.repos.d/epel.repo输入以下内容


[epel]

name=Extra Packages for Enterprise Linux 6 - $basearch

#baseurl=http://www.landui.com/pub/epel/6/$basearch

mirrorlist=https://www.landui.com/metalink?repo=epel-6&arch=$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

 

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 6 - $basearch - Debug

#baseurl=http://www.landui.com/pub/epel/6/$basearch/debug

mirrorlist=https://www.landui.com/metalink?repo=epel-debug-6&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

gpgcheck=1

 

[epel-source]

name=Extra Packages for Enterprise Linux 6 - $basearch - Source

#baseurl=http://www.landui.com/pub/epel/6/SRPMS

mirrorlist=https://www.landui.com/metalink?repo=epel-source-6&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

gpgcheck=1

然后执行yum clean all

yum makecache即可


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: