translated by NearTan

This commit is contained in:
NearTan 2013-12-02 20:41:35 +08:00
parent 7eb7777ea1
commit ddd4395cff
2 changed files with 101 additions and 96 deletions

View File

@ -1,96 +0,0 @@
NearTan 选题
How to setup EPEL repository on CentOS 5/6
================================================================================
What is EPEL repository
EPEL (Extra Packages for Enterprise Linux) is a project from the Fedora group that maintains a repository of software packages that are not already present on RHEL/CentOS. The repository is compatible with RHEL and all close derivates like CentOS and Scientific Linux.
By using epel we can easily install many packages (around 10,000) with yum command, that are not already present in the centos repositories. EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions.
Further details about the epel project are available at
[https://fedoraproject.org/wiki/EPEL][1]
So in this tutorial I am going show you how to setup the epel repositories on CentOS
> Note - There are many different 3rd party repositories that provide software packages for RHEL/CentOS systems. Some of the most popular ones are RpmForge, RpmFusion, EPEL, Remi etc.
>
> However it should be always kept in mind, that if multiple such third party repositories are added to a system, then it can lead of conflicts. The same package can come from multiple repositories, and some repositories can replace base packages of a system leading to unexpected troubles. Rpmforge and Epel are known to have conflicts.
>
> There are advanced techniques to tackle this like setting up priorities, or selectively installing packages from repositories, but ofcourse these require a lot of effort and so if you are not sure about all this, it is recommended to only use 1 such external repository.
### Install EPEL on CentOS ###
To setup epel on centos, we need to download the epel installation rpm and install it.
The downloads pages for version 6.x and 5.x of CentOS/RHEL are the following
[http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html][2]
[http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html][3]
The above urls would probably redirect to country specific mirrors for faster download. The page would contain a download link to download the rpm directly. The direct download links are
[http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm][4]
[http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm][5]
Select the correct url depending on your centos version.
Note that the EPEL installer package is architecture independant, so can be installed on both x86 and x64 systems.
### 1. Check your CentOS version ###
First check your centos version with the following command
$ cat /etc/redhat-release
CentOS release 6.4 (Final)
### 2. Download EPEL rpm ###
Now download the epel rpm file for the corresponding centos version from one of the urls given above.
$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
### 3. Install the EPEL rpm ###
Now install the epel package with the rpm command
$ sudo rpm -ivh epel-release-6-8.noarch.rpm
or
$ sudo rpm -ivh epel-release*
### 5. Check EPEL repository ###
After installing the epel repository, check that it has been added to the repository list with the yum command
# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.vonline.vn
* epel: buaya.klas.or.id
* extras: centos-hn.viettelidc.com.vn
* updates: mirrors.fibo.vn
repo id repo name status
base CentOS-6 - Base 6,381
epel Extra Packages for Enterprise Linux 6 - x86_64 10,023
extras CentOS-6 - Extras 13
nginx nginx repo 47
updates CentOS-6 - Updates 1,555
repolist: 18,019
The epel is listed after base repo and provides around 10K packages. So epel is now setup on CentOS.
The epel repository is setup in the **/etc/yum.repos.d/epel.repo** file.
Now install something from the epel repository
$ sudo yum install htop
--------------------------------------------------------------------------------
via: http://www.binarytides.com/setup-epel-repository-centos/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://fedoraproject.org/wiki/EPEL
[2]:http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
[3]:http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html
[4]:http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

View File

@ -0,0 +1,101 @@
如何在CentOS 5/6上安装EPEL 源
================================================================================
ps:这篇翻得很吃力,麻烦校对大人了 ToT
ps2:原文第五个链接失效,已修正)
EPEL 是什么?
EPEL (Extra Packages for Enterprise Linux) 是Fedora 小组维护的一个项目。这个项目是一个软件仓库为RHEL/CentOS 提供他们所不默认提供的软件包。这个源兼容RHEL 和像CentOS 和Scientific Linux 这样所有由其衍生出来的版本。
我们可以轻易地通过yum 命令从EPEL 源上获取上万个在CentOS 自带源上没有的软件。EPEL 提供的软件包大多基于Fedora 不会与企业版Linux 发行版本的软件发生冲突或互相替换文件。
更多关于EPEL 项目的细节可以到以下网站获取。
[https://fedoraproject.org/wiki/EPEL][1]
在文本中我将展示在CentOS 下如何安装EPEL 源
> 提示 - RHEL/CentOS 系统有着太多的第三方源比较流行的比如RpmForge RpmFusion EPEL Remi等等。
>
> 然而需要时刻注意的是如果系统添加了多个第三方源可能会因此产生冲突——一个软件包从多个源获取一些源会替换系统的基础软件包可能会产生意想不到的错误。已知的就有Rpmforge 与EPEL 会产生冲突。
>
>
> 对于这些问题我们建议,调整源的优先权或者有选择性的安装源,但是这需要复杂的操作,如果你不确定如何操作,我们推荐你只安装一个第三方源。
### 在CentOS 上安装EPEL ###
要想安装EPEL我们先要下载EPEL 的rpm安装包。
CentOS/RHEL 下的6.x 和5.x 版本下载页面如下
[http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html][2]
[http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html][3]
以上网址可能会为了获取更快的下载速度被重定向到特地的镜像站。这页面包含可以直接获取到rpm 包的下载链接。直接的下载链接如下
[http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm][4]
[http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm][5]
根据你的CentOS 版本来选择正确的下载地址。
请注意EPEL 的安装包是独立编译的所以它可以安装在32位和64位系统中。
### 1. 确认你的CentOS 的版本 ###
首先通过以下命令确认你的CentOS 版本
$ cat /etc/redhat-release
CentOS release 6.4 (Final)
### 2. 下载EPEL 的rpm 安装包 ###
现在从上面的地址下载CentOS 版本所对应的EPEL 的版本
$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
### 3. 安装EPEL ###
通过以下命令安装EPEL 软件包
$ sudo rpm -ivh epel-release-6-8.noarch.rpm
or
$ sudo rpm -ivh epel-release*
### 5. 检查EPEL 源 ###
安装好EPEL 源后用yum 命令来检查是否添加到源列表
# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.vonline.vn
* epel: buaya.klas.or.id
* extras: centos-hn.viettelidc.com.vn
* updates: mirrors.fibo.vn
repo id repo name status
base CentOS-6 - Base 6,381
epel Extra Packages for Enterprise Linux 6 - x86_64 10,023
extras CentOS-6 - Extras 13
nginx nginx repo 47
updates CentOS-6 - Updates 1,555
repolist: 18,019
EPEL 已经在repo 后列出并且显示提供了上万个软件包所以EPEL 已经安装到你的CentOS了。
EPEL 源已经安装到**/etc/yum.repos.d/epel.repo** 文件。
现在来试一下从EPEL 获取软件包
$ sudo yum install htop
--------------------------------------------------------------------------------
via: http://www.binarytides.com/setup-epel-repository-centos/
译者:[NearTan](https://github.com/NearTan) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://fedoraproject.org/wiki/EPEL
[2]:http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
[3]:http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html
[4]:http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[5]:http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm