![](http://1.bp.blogspot.com/-v_YFAhggGdE/WElzvRO0zJI/AAAAAAAAM-o/bY1k2vDI_ZUfxoZqv86Er-sngxthM2urgCLcB/s1600/redhat-repo.png)
Since the red hat enterprise linux is a commercial version of linux family, you need a valid support account to install packages through its repository. If you don't have valid support account from Red Hat then you can not install packages through its repository.
Unfortunately, RPMForge and RepoForge are no more available as stated on their official website so we will use extra packages enterprise linux (EPEL) an open source and free repository project from Fedora developers which provides software packages and dependencies for Linux distribution including Red Hat Enterprise Linux, CentOS, and Scientific Linux.
This Linux Guide will walk you through the steps to install and use yum repository on red hat and centos linux on different release.
Enabling Yum Repository in RHEL and CentOS 7/6/5/4
To begin, we need to install EPEL repository package from the following links. You must be a root user to install repository package using below links based on your Linux versions.
Check your linux operating system version using the following command.
uname -r
RHEL and CentOS 7 64 bit Repo
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
RHEL and CentOS 6 32-64 bit Repo
rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RHEL and CentOS 5 32-64 bit Repo
rpm -ivh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -iv http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RHEL and CentOS 4 32-64 bit Repo
rpm -ivh http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
rpm -ivh http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
Since we have installed repository package, now we need to execute the following command to verify epel repository is enabled or not.
Our epel repository is available and enabled. Lets search and install packages through it. For instance, we will search for Zabbix package.
Output
Now we will install Zabbix package from epel repository with the following command
Through the above steps you can install as many repositories as you want on your Linux system.
Conclusion
We have demonstrated how to enable yum repository in red hat enterprise linux and CentOS. I hope this guide was helpful to install and enable repository on your linux machine.