Howto: Add a new yum repository to install software under CentOS / Redhat Linux

CentOS / Fedora Core / RHEL 5 uses yum for software management. Yum allows you to add a new repository as a source to install binary software.

Understanding yum repository

yum repository configured using /etc/yum.conf file. Additional configuration files are also read from the directories set by the reposdir option (default is /etc/yum.repos.d and /etc/yum/repos.d.

RPMforge repository

Usually repository carries extra and useful packages. RPMforge is one of such repository. You can easily configure RPMforge repository for RHEL5 just by running following single RPM command:
# rpm -Uhv
For 64 bit RHEL 5 Linux enter:
# rpm -Uhv

Now you can install software from RPMforge.

How do I install 3rd party repository manually?

Let us say you would like to install 3rd party repository from Create a file called foo:
# cd /etc/yum.repos.d
# vi foo

Append following code:
name=Foo for RHEL/ CentOS $releasever - $basearch

Save and close the file.


  • [foo] : Repository name i.e. The [main] section must exist for yum to do anything.
  • name=Foo for RHEL/ CentOS $releasever - $basearch : A human readable string describing the repository name
  • baseurl=$releasever/$basearch/ : Must be a URL to the directory where the yum repository s ‘repodata directory lives
  • enabled=1 : Enabled or disabled repo. To disable the repository temporarily set the enabled to 0
  • gpgcheck=1 : Security feature use GPG key
  • gpgkey= : GPL file location

Also you need to import the gpg key for the repository as follows:
# rpm --import

Now you are ready to install software from foo repository. For further information refer to yum.conf man page:
$ man yum.conf
$ man yum




This is very great and brilliant information.
qooapp apk iphone

Tutu App

Tutu App

Wonderfull  keep sharing Awesome post really appreciating TutuApp features
TutuApp is one of the most trending apps because it provides paid apps for free. Now you can also get TutuApp on your iPhone/iOS



If you are considering using a 3rd Party Repository, then you should seriously consider how to prevent unintended ‘updates’ from these side archives from over-writing some core part of CentOS. One approach is to only enable these archives from time to time, and generally leave them disabled. See: man yum. Another approach is to use the exclude= and includepkgs= options on a per sub-archive basis, in the matching .conf file found in /etc/yum.repos.d/ See: man yum.conf. Get the latest version of software from



All of the above works fine for installing software that is provided as part of the CentOS system, but what about if you want to install a software package that isn't provided by CentOS? This is where 3rd party repositories come in. A vast amount of software has been packaged and is maintained by the packagers and placed into 3rd party software repositories such that it can be installed using YUM. Please read the Wiki page on repositories here:

wiki.centos. org/AdditionalResources/Repositories

RPMForge and ATrpms were two of the larger 3rd party repositories that provided software packages for CentOS. However, rpmforge has been largely unmaintained for about 3 or 4 years at the time of writing (late 2016) and is no longer recommended for use. There have been no security updates published for rpmforge packages in several years and what exists may contain unfixed security vulnerabilities. The situation with ATRpms is similar although with this repo, the mirrors that contain the content are often offline so it's tricky to install anything at all and probably lucky that you cannot since it too suffers the same problems as rpmforge - late or missing updates.

The EPEL repository is generally safe and is now easily installable on all supported CentOS versions by running yum --enablerepo=extras install epel-release as the epel-release package is now in the CentOS "extras" repo to make life easier.

Other third party yum repositories include, nux-dextop which is the current best source for multimedia packages on CentOS and ELRepo which provides hardware support such as display and network drivers.

However, we need to be careful when enabling 3rd party repositories so that they don't conflict with CentOS packages. For example, they may contain newer versions of software packages that may break your system. For this reason we strongly advise not to update packages provided by CentOS with versions from 3rd party repositories as this may break things. Remember - if you break your system, you get to keep the pieces.

To get around this problem we can use a plugin for YUM called 'priorities'. Priorities allows us to rank repositories from 1 to 99 such that packages installed from a repository with a lower number (higher ranking) will never be overwritten or upgraded by a package from a repository with a higher number (lower ranking). For example, if the CentOS base and updates repositories have a priority of 1 and EPEL has a priority of 10, a package from EPEL will never be able to replace a package from CentOS base or updates.

If you are going to enable 3rd party repositories then it is highly recommended that you also install and configure the priorities plugin to manage them. All the respirataries are available for free on tutuvip app.