How To Enable or Install EPEL Repo on CentOS/RHEL 6.x/5.x Linux
This post will guide you how to install or enable EPEL repository in you CentOS or RHEL 6.x/5.x Linux. How to enable EPEL repo to install packages on CentOs 6.5 or RHEL 6.5 Linux.
- Install or Enable EPEL Repo on CentOS 6.x or 5.x Linux
- Check EPEL Repo If It is Enabled
- Install Package Using EPEL Repo
- List All Packages in EPEL Repo
What is EPEL?
Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).
EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions. EPEL uses much of the same infrastructure as Fedora, including buildsystem, bugzilla instance, updates manager, mirror manager and more.
Install or Enable EPEL Repo on CentOS 6.x or 5.x Linux
If you want to enable EPEL repo to install packages in your system, you need to installed epel rpm package firstly, as it is not installed by default. Just do the following steps:
#1 download EPEL repo rpm package from fedora site, type:
For CentOS 6.x:
#wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
For CentOS 5.x :
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
#2 install the downloaded epel rpm package via rpm command or yum command, type:
# rpm -ivh epel-release-latest-6.noarch.rpm
or
# rpm -ivh epel-release-latest-5.noarch.rpm
Checking EPEL Repo If it is enabled
After installed epel rpm package on your Linux system, you need to check if EPEL repository is enabled or not, type:
# yum repolist
Outputs:
[root@osetc_test rar]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.sfo12.us.leaseweb.net * epel: mirror.sfo12.us.leaseweb.net * extras: mirror.fileplanet.com * updates: linux.mirrors.es.net repo id repo name status base CentOS-6 - Base 6,713 epel Extra Packages for Enterprise Linux 6 - x86_64 12,500 extras CentOS-6 - Extras 33 updates CentOS-6 - Updates 233 repolist: 19,479 [root@osetc_test rar]#
From the above outputs, the EPEL repo is already enabled in your system.
Install Package Using EPEL Repo
After enabled EPEL repository, you can try to install a package using EPEL repo. For example, you want to install atop tool using EPEL repo, just type the following command:
#yum --enablerepo=epel install atop
Outputs:
[root@osetc_test rar]# yum --enablerepo="epel" install atop Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: mirror.sfo12.us.leaseweb.net * epel: mirror.sfo12.us.leaseweb.net * extras: mirror.fileplanet.com * updates: linux.mirrors.es.net Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package. --> Running transaction check ---> Package atop.x86_64 0:1.27-2.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ===================================================================================================================== Package Arch Version Repository Size ===================================================================================================================== Installing: atop x86_64 1.27-2.el6 epel 106 k Transaction Summary ===================================================================================================================== Install 1 Package(s) Total download size: 106 k Installed size: 229 k Is this ok [y/N]:
List All Packages in EPEL Repo
If you want to list all packages in EPEL Repo in Your linux, you can type the following command:
# yum --disablerepo="*" --enablerepo="epel" list available | less
You can also use the yum search command to search packages in EPEL repository only, type:
# yum --disablerepo="*" --enablerepo="epel" search packageName
For example, you want to search atop package in EPEL repository, type:
# yum --disablerepo="*" --enablerepo="epel" search atop
Outputs:
[root@osetc_test rar]# yum --disablerepo="*" --enablerepo="epel" search atop Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: mirror.sfo12.us.leaseweb.net ================================================= N/S Matched: atop ================================================= atop.x86_64 : An advanced interactive monitor to view the load on system and process level Name and summary matches only, use "search all" for everything.
See Also: