Steps to add a new yum repository to install software under CentOS / Redhat Linux

Steps to add a new yum repository to install software under CentOS / Redhat Linux:

CentOS / Fedora Core / RHEL 5 uses yum for software management. YUM-Yellowdog Updater, Modified is an open-source command-line package-management utility.

In this article we are going to see the steps involved in adding a new yum repository.

For example, consider that we are going to install a 3rd party repository from

1. cd /etc/yum.repos.d

2. Create a file using your favorite text editor.

vi testrepo

3. Add the following code:
name=testrepo for RHEL/ CentOS $releasever – $basearch

[testrepo] : Repository name i.e. The [main] section must exist for yum to do anything.
name= testrepofor 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

4. Import the gpg key for the repository:
rpm –import

5. Now you can proceed with the installation of software from testrepo repository.

  1. #1 by Xen VPS on July 18, 2013 - 12:01 PM

    Quality computer hardware, light speed networking and well structured VPS / clustered VPS solutions will
    likely make a big difference when compared with very low-price VPS offerings, with regards to
    performance, management and up-time for any serious online

  2. #2 by best UK hosting on August 11, 2013 - 8:43 PM

    What’s Going down i am new to this, I stumbled upon this I have discovered It positively helpful and it has aided me out loads. I am hoping to give a contribution & assist other customers like its aided me. Great job.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: