分享

在Centos 5.x或6.x上安装RHEL EPEL Repo

hyj 发表于 2013-12-31 16:35:19 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 0 6291
本帖最后由 hyj 于 2013-12-31 16:40 编辑

安装步骤
Centos 5.x

wget http://dl.fedoraproject.org/pub/ ... ease-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -ivh epel-release-5-4.noarch.rpm
rpm -ivh remi-release-5.rpm
Centos 6.x

wget http://dl.fedoraproject.org/pub/ ... ease-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -ivh epel-release-6-8.noarch.rpm
rpm -ivh remi-release-6.rpm

完成后的设置

ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo
返回

/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/remi.repo
允许remi repository

vi /etc/yum.repos.d/remi.repo
编辑[remi]下的enabled选项从0设为1

[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
至此,安装完成。

安装完运行yum报错:

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

解决办法:

vi /etc/yum.repos.d/epel.repo

编辑[epel]下的baseurl前的#号去掉,mirrorlist前添加#号。正确配置如下:

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
再运行

yum makecache

没找到任何评论,期待你打破沉寂

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条