Wednesday, August 20, 2014

Enable EPEL Repo on CentOS 5 and CentOS 6


What is the EPEL repo?

The EPEL (Extra Packages for Enterprise Linux) yum repository is an excellent source for additional packages for CentOS. Instead of having to compile applications that aren’t included in CentOS’ built-in repositories from source, EPEL can be used.
The EPEL repo is enabled by simply installing an RPM. Please use the command below to install the EPEL repository on your CentOS server. If you are unsure of your CentOS version or architecture, 
The following will help you to determine the version and architecture of your CentOS server:

To find your CentOS version and architecture, you can use the following easy commands.

1. Quick and easy command to show what version and architecture your CentOS server is running:

$ echo "I am running: `cat /etc/redhat-release` (`arch`)"
I am running: CentOS release 5.8 (Final) (x86_64)

 2. Show CentOS version using /etc/issue:

$ cat /etc/issue
CentOS release 5.8 (Final)

 3. Show CentOS version using /etc/redhat-release:

$ cat /etc/redhat-release
CentOS release 5.8 (Final)

 4. Show CentOS architecture using the arch command:

$ arch
x86_64

 5. Show runnel kernel version and architecture with the uname command:

$ uname -r -v -p
2.6.18-308.el5.028stab099.3 #1 SMP Wed Mar 7 15:56:00 MSK 2012 x86_64

CentOS 6 – 32-bit

 CentOS 6 – 64-bit

 CentOS 5 – 32-bit

 CentOS 5 – 64-bit

After running the above commands for your relevant CentOS version, the following file is created:
/etc/yum.repos.d/epel.repo
The above file can be edited directly to enable or disable the EPEL repo.

No comments: