你的位置:首页 > 操作系统

[操作系统]配置 EPEL yum 源


当我们在linux上, 使用yum 安装包时,报错如下:

Loaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Setting up Install ProcessNothing to do

这时我们需要安装EPEL

EPEL,即Extra Packages for Enterprise Linux,这个软件仓库里有很多非常常用的软件,而且是专门针对RHEL设计的,对RHEL标准yum源是一个很好的补充,完全免费使用,由Fedora项目维护,所以如果你使用的是RHEL

从官网下载 EPEL, 安装

下载:(RHEL/CentOS 5 32-64 Bit)

wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

安装:

rpm -ivh epel-release-5-4.noarch.rpm

配置:

在 /etc/yum.repos.d/下 创建epel.repo

[epel-source]域下的enabled=0也改成enabled=1

 

enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL[epel-debuginfo]name=Extra Packages for Enterprise Linux 5 - $basearch - Debug#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debugmirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearchfailovermethod=priorityenabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPELgpgcheck=1[epel-source]name=Extra Packages for Enterprise Linux 5 - $basearch - Source#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMSmirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearchfailovermethod=priorityenabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPELgpgcheck=1

 卸载 EPEL:

[root@test ~]# rpm -e epel-release