Occasionally, when operating a CentOS-based dedicated server you may find that you require additional software packages. If the required packages are not in the current repositories that you have enabled, then you may need to add repositories to the server in order to get the software you need. This technique can be used to acquire software packages from a variety of different providers and sources. In this article, we will demonstrate how to add the EPEL Repository to a CentOS server using the command-line interface.
Note that you will require root access in order to use these directions.
Adding Repositories
- First, log into your dedicated server with the root user.
- Next, run the following command in your command-line:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
- After running that command, you should see output similar to the following
Retrieving https://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%]- In order to finalize the added repo, you may need to update the YUM package manager. Using the following command:
yum update
After entering this command, you may be asked to confirm the changes by hittingy
. You can do this by pressing the y key and then pressing enter to continue. Alternatively, you can you can just add a-y
to the end of the command to automatically confirm the update.Congratulations! You now know how to add repositories to your CentOS VPS or dedicated server. This same process can be used to add a wide variety of different repositories from many different sources. One of the benefits of the open-source nature of CentOS hosting is the ability to add additional software repositories to aid in software development or other server-based operations.
If you still want to know more about repositories, please review this article where we outline how to upgrade your repository packages.
Post navigation
- Next, run the following command in your command-line: