CentOS 5.X 6.X 使用epel yum 源

一、什么是EPEL?

二、与163 YUM源比较

三、CentOS 5.X 安装使用EPEL YUM源

四、CentOS 6.X 安装使用EPEL YUM源

五、使用心得

六、yumdownloader 工具

七、卸载EPEL源

注:操作系统 CentOS 6.X ,CentOS 5.X

一、什么是EPEL?

EPEL,即Extra Packages for Enterprise Linux(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。在这里可以获得 RHEL 的高质量、高性能、高可靠性、免费、方便易用的软件包。

二、与163 YUM源比较

今天,在Dell R610上面安装了Centos6.4 X86_64的操作系统,装完系统后,用163的YUM源安装软件,我一直都是用163的YUM源,因为是国内的YUM源,比较快。但是,我发现这个源里面,根本没有libmcrypt,libmcrypt-devel这两个RPM包,装php扩展mcrypt时,又要用到这两个包,于是我手动装了这两个libmcrypt包,发现163源中的包不全。后来又安装了heartbeat,发现又没有,于是我决定,得换个源,后来到网上搜了一下,发现了EPEL源,用了之后感觉很爽。现在就总结一下,与大家分享!


CentOS 5.X 安装使用EPEL YUM源

1. 查看操作系统版本

# lsb_release -a

Description:    CentOS release 5.5 (Final)

2.下载相应的EPEL源

32位系统:

# wget http://mirrors.yun-idc.com/epel/5/i386/epel-release-5-4.noarch.rpm

64位系统:

# wget http://mirrors.hust.edu.cn/epel//5/x86_64/epel-release-5-4.noarch.rpm

3.安装EPEL源(注:安装对应版本的rpm包)

# rpm -ivh epel-release-x-x.noarch.rpm

4.导入key文件

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

5.查看安装的EPEL源

# cd /etc/yum.repos.d/
# ll
-rw-r--r-- 1 root root 2245 2010-04-26 CentOS-Base.repo
-rw-r--r-- 1 root root  626 2010-04-26 CentOS-Media.repo
-rw-r--r-- 1 root root  954 2010-08-12 epel.repo #正式版,所有的软件都是稳定可以信赖的

-rw-r--r-- 1 root root 1054 2010-08-12 epel-testing.repo #最新的测试源


注:但是默认情况下,只有正式版是有效状态的,如果你想试试测试版的话,需要修改/etc/yum.repos.d/epel-testing.repo,把enabled=0改成enabled=1即可。

6.测试

# yum clean all
# yum list


CentOS 6.X 安装使用EPEL YUM源

1. 查看操作系统版本

# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m

2.下载相应的EPEL源

(1).32位系统

# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

(2).64位系统

# wget http://mirrors.hust.edu.cn/epel//6/x86_64/epel-release-6-8.noarch.rpm

3.安装EPEL源(注:我这里是64位系统)

# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA /SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                 ########################################### [100%]
1:epel-release           ########################################### [100%]


4.导入key文件

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

5.查看安装的EPEL源

# cd /etc/yum.repos.d/
# ll
-rw-r--r--. 1 root root 1926 2月  25 16:57 CentOS-Base.repo
-rw-r--r--. 1 root root  638 2月  25 16:57 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  623 7月  25 16:57 CentOS-Media.repo
-rw-r--r--. 1 root root 3664 2月  25 16:57 CentOS-Vault.repo
-rw-r--r--  1 root root  957 11月  5 2012 epel.repo
-rw-r--r--  1 root root 1056 11月  5 2012 epel-testing.repo

6.测试

# yum clean all
# yum list





你可能感兴趣的:(centos,yum,EPEL,源,5,6)