How to Add Repositories in CentOS

Note that you will require root access in order to use these directions.

Sometimes when you are on a dedicated server you need some extra packages installed. If those packages are not in the current repositories that you have enabled, then you may need to add a repository to the server in order to get the software you desire. We will be adding the EPEL Repository for this demonstration.

Adding Repos

  1. Log into your Dedicated Server with the root user.
  2. Run the following command in your shell instance.
    rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    warning: /var/tmp/rpm-tmp.BNvGWL: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
    Preparing… ########################################### [100%] 1:epel-release ########################################### [100%]
  3. In order to finalize the added repo you need to update your yum command. You may be asked to confirm the changes by hitting y and then enter or you can just add a -y to the command below.
    yum update

In the next article we will describe how to upgrade your repository packages.

For more information on EPEL Repository, please see the official documentation.

Leave a Reply