Monday, April 23, 2012

CentOS / RHEL / Scientific Linux 6 Enable (Install) EPEL Repo

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). How do I enable it under CentOS 6 or RHLE 6 server?

You need to install the following rpms as per your Enterprise Linux version. Use the wget command to download rpm files.

If you are running an EL6 version, enter:

$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
# rpm -ivh epel-release-6-5.noarch.rpm

If you are running an EL5 version, enter:

$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

If you are running an EL4 version, enter:

$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

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

How Do I Use EPEL Repo?

Simply use the yum commands:
# yum search nginx
# yum update

Sample outputs:
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
epel/metalink | 13 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 4.1 MB 00:03
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.0.10-1 will be updated
---> Package dkms.noarch 0:2.1.0.1-1.el6 will be an update
---> Package iftop.x86_64 0:0.17-1.el6 will be updated
---> Package iftop.x86_64 0:1.0-0.1.pre2.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================
Updating:
dkms noarch 2.1.0.1-1.el6 epel 99 k
iftop x86_64 1.0-0.1.pre2.el6 epel 44 k
Transaction Summary
==============================================================================================================================================================
Upgrade 2 Package(s)
Total download size: 144 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): dkms-2.1.0.1-1.el6.noarch.rpm | 99 kB 00:00
(2/2): iftop-1.0-0.1.pre2.el6.x86_64.rpm | 44 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 543 kB/s | 144 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6)
Package: epel-release-6-5.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating : dkms-2.1.0.1-1.el6.noarch 1/4
Updating : iftop-1.0-0.1.pre2.el6.x86_64 2/4
Cleanup : dkms-2.0.10-1.noarch 3/4
Cleanup : iftop-0.17-1.el6.x86_64 4/4
Installed products updated.
Updated:
dkms.noarch 0:2.1.0.1-1.el6 iftop.x86_64 0:1.0-0.1.pre2.el6
Complete!

No comments:

Post a Comment