Quantcast
Channel: Tech Support
Viewing all articles
Browse latest Browse all 880

How to enable yum repository on RHEL and CentOS 7/6/5/4

$
0
0

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.
# yum repolist
Loaded plugins: downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: centos.aol.in
* epel: ftp.cuhk.edu.hk
* extras: centos.aol.in
* rpmforge: be.mirror.eurid.eu
* updates: centos.aol.in
Reducing CentOS-5 Testing to included packages only
Finished
1469 packages excluded due to repository priority protections
repo id repo name status
base CentOS-5 - Base 2,718+7
epel Extra Packages for Enterprise Linux 5 - i386 4,320+1,408
extras CentOS-5 - Extras 229+53
rpmforge Red Hat Enterprise 5 - RPMforge.net - dag 11,251
repolist: 19,075
Our epel repository is available and enabled. Lets search and install packages through it. For instance, we will search for Zabbix package.
# yum --enablerepo=epel info zabbix
Output
Available Packages
Name : zabbix
Arch : i386
Version : 1.4.7
Release : 1.el5
Size : 1.7 M
Repo : epel
Summary : Open-source monitoring solution for your IT infrastructure
URL : http://www.zabbix.com/
License : GPL
Description: ZABBIX is software that monitors numerous parameters of a network.
Now we will install Zabbix package from epel repository with the following command
# yum --enablerepo=epel install zabbix
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.




Viewing all articles
Browse latest Browse all 880

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>