repository,資源庫,源的意思。RHEL EPEL(Extra Packages for Enterprise Linux) Repo是Linux發行版中最大的軟件倉庫之一,免費,豐富的軟件包更新。
安裝步驟
Centos 5.x
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-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/epel/6/x86_64/epel-release-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