Management Portal

Using CentOS Repositories & How To Install Great 3rd Party Software

repos-feat

Using CentOS Repositories & How To Install Great 3rd Party Software

Repositories (or “Repos” as you’ll frequently hear them be called) are one of the central pieces to the puzzle of how your CentOS server works. By default, CentOS comes with a lot of great software, and sometimes it’s got all you ever need for a server already included – but sometimes it hasn’t. Before we get into the nitty gritty of what sort of software you’ll find in various repositories and how to use them, first: some background. CentOS comes preinstalled with YUM, a package management utility that allows for automatic updates and package/dependency management on RPM-based distributions. YUM stands for “Yellowdog Updater, Modified”, and it depends on RPMs, which is a method of packaging software. Red Hat-based linux distributions, like CentOS, use the RPM system for installing packaged software.

By default, CentOS comes preconfigured to automatically look for software in the “CentOS Official Repository”. QuadraNet clients will benefit from a locally-hosted CentOS official repository, which means that downloads from the repo are guaranteed to be extremely quick. Some other large software repositories that are extremely popular include: EPEL, RPMforge, ElRepo, REMI, and Webtatic. “Now”, you’re asking, “how do I go about using these to actually install software?”

First, change your active directory to /etc/yum.repos.d/ (cd /etc/yum.repos.d/). Type ls and you’ll notice several files – most likely CentOS-Base.repo and several other related official CentOS repositories. There are two ways to add additional repos to this list – either “automatically” or “manually”. Since CentOS comes with the RPM utility, most of the popular repositories have created packages that allow you to type a single command to get their repository working on your system. For example, here are the appropriate commands for EPEL, ElRepo, RPMForge, REMI, and Webtatic. If you don’t know which architecture you have, you can type the uname -a command – if at the end of the kernel version you see “el6”, that means you have CentOS 6 (and likewise for 5). If after that it says “x86_64”, then you have a 64bit release; otherwise you will likely see “i686” or “i386”, which corresponds to the architectures given below.

EPEL

CentOS/RHEL 7, 64 Bit (x86_64):
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

CentOS/RHEL 6, 32 Bit (i686):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

ElRepo

First, import the public key for security: rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

CentOS/RHEL 7:
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

CentOS/RHEL 6:
# rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

CentOS/RHEL 5:
# rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm

RPMForge

CentOS/RHEL 6, 32 Bit (i686):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm

REMI

CentOS/RHEL 6, 32 Bit (i386):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS/RHEL 6, 64 Bit (x86_64):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS/RHEL 5, 32 Bit (i386):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Webtatic

CentOS/RHEL 6:
# rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm

CentOS/RHEL 5:
# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Once you’ve installed the repositories of you’re choosing, you’ll want to ensure that they’re set to “enabled”. You can do this by typing cat /etc/yum.repos.d/reponame where “reponame” is the name of the repo, like “elrepo.repo”. You can determine the exact name by typing ls /etc/yum.repos.d/. In the file, you’ll see a line that says “enabled=0” or “enabled=1”. You’ll want to change this to “enabled=1” if it is currently set to 0.

Now you’re all set and ready to install some packages! Try “yum install htop” for a cool, interactive process viewer (an alternative to “top”), which is included in the EPEL repository.

Having trouble? Ask QuadraNet Support and our 24x7x365 team of techs will be happy to assist on any managed dedicated or colocated server!