Wednesday, November 23, 2011

Add Dag RPM Repository in RHEL5


Add Dag RPM Repository for yum because that has many useful packages.

[root@dns ~]# wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
[root@dns ~]# rpm --import RPM-GPG-KEY.dag.txt
[root@dns ~]# rm -f RPM-GPG-KEY.dag.txt
[root@dns ~]# vi /etc/yum.repos.d/dag.repo ###Create this file and add following lines:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el5/en/$basearch/dag/
gpgcheck=1
enabled=0

# When you use dag repository, Input yum command like below.

[root@dns ~]# yum --enablerepo=dag install [package]


[root@dns ~]# wget http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL

[root@dns ~]# rpm --import RPM-GPG-KEY-EPEL
[root@dns ~]# rm -f RPM-GPG-KEY-EPEL
[root@dns ~]# vi /etc/yum.repos.d/epel.repo           ###Create this file and add following lines:
[epel]
name=EPEL RPM Repository for Red Hat Enterprise Linux
baseurl=http://download.fedora.redhat.com/pub/epel/$releasever/$basearch/
gpgcheck=1
enabled=0

[root@jbox01 ~]# rpm -qa|grep gpg-pubkey*
gpg-pubkey-217521f6-45e8a532

[root@jbox01 ~]# rpm -qi gpg-pubkey-217521f6-45e8a532

# When you use dag repository, Input yum command like below.

[root@dns ~]# yum --enablerepo=epel install [package]

Repository Configuration


This are the only third repositories I use, I contribute to and I recommend.

1. Download

It is preferable to use YUM to download and install RPM available on this site, however il can be useful to download a RPM for a futher use or for another computer.
Locations :

2. Package manager configuration

This repository use the YUM format, it can also be used with APT and SMART. It need to be declared.
Notes :
  • ppc64 (PowerPC 64 bits) repositories are only open for Fedora 8 and newer.
  • x86_64 (64 bits) and ppc (PowerPC) repositories are only open for Fedora Core 6 and newer.
  • For older releases only the i386 (32 bits) repository is open.
  • 2008-05-17 : The Fedora Core 3 repository is closed (it stay available but will not be updated).
  • 2009-04-19 : The Fedora Core 4 and 5 repositories are closed.
  • 2010-10-11 ; The Fedora Core 6 and Fedora 7 repositories are closed.
  • 2011-09-16 ; The Fedora 8 and Fedora 9 repositories are closed.
2.1. YUM automatic configuration
The simplest way is to install the remi-release package which provides the repository configuration for YUM and the GPG key used to sign the RPM.
Fedora 15 i386 or x86_64
rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm
Fedora 14 i386 or x86_64
rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm
Fedora 13 i386 or x86_64
rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm
Fedora 12 i386, ppc, ppc64 or x86_64
rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm
Fedora 11 i386, ppc, ppc64 or x86_64
wget http://rpms.famillecollet.com/remi-release-11.rpm
rpm -Uvh remi-release-11.rpm
Fedora 10 i386, ppc, ppc64 or x86_64
wget http://rpms.famillecollet.com/remi-release-10.rpm
rpm -Uvh remi-release-10.rpm
Enterprise Linux 6 (with EPEL)
wget http://download.fedora.redhat.com/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
Enterprise Linux 5 (with EPEL)
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
Enterprise Linux 4 (with EPEL)
wget http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-10.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-4.rpm
rpm -Uvh remi-release-4*.rpm epel-release-4*.rpm
2.2. APT configuration
As for YUM, install the automatic configuration package. To enable the repository, you need to uncomment, in /etc/apt/sources.list.d/remi.list file, the line :
repomd http://rpms.famillecollet.com/ fc$(VERSION).$(ARCH)
2.3. SMART configuration
As for YUM, install the automatic configuration package. To enable the repository, you have to select it in the Edition / Channel menu.
2.3. YUM manual configuration
You just have to download the repository file configuration and to save it in the appropriate direcotry.
Fedora :
su -
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/fedora/remi.repo
Enterprise Linux (RHEL, CentOS) :
su -
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
This file provides configuration for remi and remi-test repositories.
Notice : the repository is not enabled on install (enabled=0). You need to enable it when you need it, for example :
yum --enablerepo=remi install firefox-langpack-fr

3. Compatibility with other repositories

On Fedora, available RPM mainly use dependencies from  fedora, and updates repositories, sometime from Livna. (And, from Extras when Fedora <= 6) and now from Rpmfusion.
On Redhat and CentOS dépendencies are in main repositories and in EPEL. I really discourage you from using Rpmforge (well known conflicts with EPEL).
Exceptions are explained on the blog article of each RPM.

4. Remi's signature Installation (GPG Key)

This step is not required if you use a package manager (Yum of Apt).
The RPM validity check requires my key to be imported on your system before use. Download This GPG key and install it with :
rpm --import RPM-GPG-KEY-remi
YUM will propose you to automatic install it on first installation of a RPM from my repository.
You can list the installed key with :
rpm -q gpg-pubkey --qf "%{summary} ->%{version}-%{release}\n"
My old key fingerprint was : 00f97f56-4267cb5c
My new key fingerprint is : 00f97f56-467e318a