Well a few people, like myself, are running RHEL 5 but dont have the money to continue to pay for RHN subscription, meaning “Yum install X” wont work. This is rather irritating, as you will need to hobble around the internet looking to find and install the RPM and all of its dependencies manually, not bad for when your learning but a real pain after the first 50 times!
There is a way however, to keep your mind from self-destructing. You can use the repositories of CentOS 5, RHEL 5’s open source brother, to allow yum to work (as they are very similar, you can point to the Centos repositories as opposed to the RHEL ones and they will still work 99% of the time).
Below is how i have managed to do this.
Firstly, you will need to disable the RHN Plugin, by using:rpm -e yum-rhn-plugin
Secondly, you will need to go into /etc/yum.repos.d and use an editor such as gedit, vi, nano etc on the file “rhel-debuginfo.repo” which will bring up the config (do this by typing “gedit rhel-debuginfo.repo” in Command line).
Finally, copy and paste the following config:
[rhel-debuginfo] name=Red Hat Enterprise Linux $releasever – $basearch – Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[base] name=CentOS-5 – Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
#baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#released updates
[updates] name=CentOS-5 – Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates
#baseurl=http://mirror.centos.org/centos/centos/5/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released
[addons] name=CentOS-5 – Addons
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons
#baseurl=http://mirror.centos.org/centos/centos/5/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#additional packages that may be useful
[extras] name=CentOS-5 – Extras
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras
#baseurl=http://mirror.centos.org/centos/centos/5/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages
[centosplus] name=CentOS-5 – Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=centosplus
#baseurl=http://mirror.centos.org/centos/centos/5/os/i386/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
After you have done this, save your config and exit your text editor.
Go into command line once again, and type “yum update” and your repositories will be ready to go.
congratulations!! Good work!!
greetings from Mexico.
thanks