Search this blog

Tuesday, September 18, 2012

setting EPEL and RPMFORGE repositories on CentOS 6

RPMFORGE and EPEL are two very useful repositories for the CentOS user. To a certain extent, one might find his usage of CentOS very limited without products offered by these repositories. 

How to add RPMForge ?

If you seriously consider using this repository for production environments follow the CentOS Wiki methodically. I personally use the following minimal process, for development environments: 
  1. Log on as root. 
  2. cd to a working directory where you will keep configuration files for the setup (not /etc or the likes. something used for files that assist you in configurations. Every admin makes his own choices, but if you have no past experience, create a folder under your home folder with a name such as "admin files" and cd to that folder. 
  3. from the command line, type:
    wget   (this url is used for 64bit installations. if you use a 32bit o.s, then type     wget
  4. to verify the the package we've just downloaded, type the following commands:
    rpm --import
    rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
  5. and if everything is ok, from the command line, type:
    rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm     (you can replace the '*' with x86_64 or i686, if you wish to be accurate, and you have to if you have downloaded  both rpm files)
  6. that's it. RPMFORGE is set up. you can verify taking a look at /etc/yum.repos.d/    or by typing at the command line: yum install htop and after the process ends successfully, by running htop from the command line. 

How to add EPEL ?
You can read more about EPEL here.
A detailed guide about installing EPEL can be found here. (it also discusses the REMI repository).
  1. Log on as root. 
  2. cd to a working directory where you will keep configuration files for the setup.
  3. from the command line, type:
    sudo rpm -Uvh epel-release-6*.rpm
Some remarks:
  1. Repositories management can be tricky. For production environments YOU HAVE GOT TO KNOW WHAT YOU ARE DOING. The professional norm, once using more than one third-party repository, is to use the yum-plugin-priorities
  2. As you can see, no verification of the epel-release*rpm is performed. Every repository has its norms, and one has to be willing to adapt in order to gain access. EPEL has verification during installation of packages, as you'll see as soon as you start using it. What is more imporant for to to convey here, is that repositories trust is an issue that must be considered. ONLY YOU KNOW THE RISKS AND SECURITY NORMS OF YOUR ORGANIZATION. 
  3. If you take a look under /etc/yum.repos.d/ you can see that the configuration files of the repositories are set so that only the main section of the repository is set as enabled. For example, if you seek sources of EPEL packages, you will need to make that section enabled in the configuration files. 
  4. Don't forget to have fun ! 

[Update: this post has been originally written for previous versions of CentOS; it has been recently verified with CentOS 6.3; October 2013]