Update Red Hat Linux 5.5 with CentOS packages

I don’t have a subscription to us the Red Hat repo so this is what I tried, adapting the instructions at http://www.linuxquestions.org/questions/red-hat-31/how-to-update-redhat-from-centos-repos-696783/.

– Rename /etc/yum.repos.d/rhel….repo file

– Create /etc/yum.repos.d/centos.repo with the following content

############################################################
## ##
## RedHat EL5 using CentOS 5 repos. ##
## i386 ##
############################################################
[base]
name=Red Hat Linux – Base
#mirrorlist=http://mirror.centos.org/centos-5/5/os/i386/repodata/
baseurl=http://mirror.centos.org/centos-5/5/os/i386/
enabled = 1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#priority=1

#released updates
[updates]
name=Red Hat Linux – Updates
#mirrorlist=http://mirror.centos.org/centos-5/5.3/updates/i386/repodata/
baseurl=http://mirror.centos.org/centos-5/5/updates/i386/
enabled = 1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#priority=1

#released addons
[addons]
name=Red Hat Linux – addons
#mirrorlist=http://mirror.centos.org/centos-5/5.3/addons/i386/repodata/
baseurl=http://mirror.centos.org/centos-5/5/addons/i386/
enabled = 0
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#priority=1

#released Sources
[SRPMS]
name=Red Hat Linux – SRPMS
#mirrorlist=
baseurl=ttp://mirror.centos.org/centos-5/5/os/SRPMS/
enabled = 1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#priority=1
################## EOF ################################

mkdir /var/cache/yum/centos

download the public key from
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

rpm –import RPM-GPG-KEY-CentOS-5

And from my own limited experience, it works! I’ll post back if I find any issues further down the line.

Advertisements