EPEL 是yum的一个软件源,里面包含了许多基本源里没有的软件。我们可以很容易地通过yum命令从EPEL源上获取上万个在CentOS自带源上没有的软件。EPEL提供的软件包大多基于其对应的Fedora软件包,不会与企业版Linux发行版本的软件发生冲突或替换其文件。
一、查看centos版本
[root@yj ~]# cat /etc/redhat-release CentOS release 6.4 (Final)
二、检查系统是否安装epel-release:
[root@yj ~]# rpm -q epel-release package epel-release is not installed
三、安装EPEL
CentOS
用户可以直接通过 yum install epel-release
安装并启用 EPEL 源。CentOS Extras 默认包含该包。
[root@yj ~]# yum install epel-release
成功返回:
Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirrors.sina.cn * extras: mirrors.sina.cn * updates: mirrors.tuna.tsinghua.edu.cn Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:6-8 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: epel-release noarch 6-8 extras 14 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 14 k Installed size: 22 k Is this ok [y/N]: y Downloading Packages: epel-release-6-8.noarch.rpm | 14 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : epel-release-6-8.noarch 1/1 Verifying : epel-release-6-8.noarch 1/1 Installed: epel-release.noarch 0:6-8 Complete!
再次检查:
[root@yj ~]# rpm -q epel-release epel-release-6-8.noarch
安装成功!
四、查看其所依附的软件文件
[root@yj ~]# rpm -qR epel-release /bin/sh /bin/sh config(epel-release) = 6-8 redhat-release >= 6 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1
五、导入KEY
[root@yj ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
六、安装yum-priorities
[root@yj ~]# yum install yum-priorities
成功返回:
Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.sina.cn * updates: mirrors.tuna.tsinghua.edu.cn epel | 4.3 kB 00:00 epel/primary_db | 5.9 MB 00:05 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package yum-plugin-priorities.noarch 0:1.1.30-37.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: yum-plugin-priorities noarch 1.1.30-37.el6 base 27 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 27 k Installed size: 28 k Is this ok [y/N]: y Downloading Packages: yum-plugin-priorities-1.1.30-37.el6.noarch.rpm | 27 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : yum-plugin-priorities-1.1.30-37.el6.noarch 1/1 Verifying : yum-plugin-priorities-1.1.30-37.el6.noarch 1/1 Installed: yum-plugin-priorities.noarch 0:1.1.30-37.el6 Complete!
查看
[root@yj ~]# cd /etc/yum.repos.d [root@yj yum.repos.d]# ls |grep epel epel.repo epel.repo~ epel-testing.repo