Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was given a VM for a RHEL5.5 machine but I do not have a RHN subscription. I get this warning when using yum:

bash-3.2$ sudo yum update
[sudo] password for streamsadmin: 
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update

Can I switch to using CentOS repositories instead?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can certainly make this switch. Basically you, more or less, point your installation to CentOS repositories and continue on your merry way. You'll have one major problem, though, in that all the CentOS repos seem to have their 5.x packages at release 5.9. There appears, at a quick glance, to be no 5.5 specific repos any longer.

I did this on a web farm years ago (approx RHEL/CentOS 5.3 era) but haven't since.... Make sure you have current backup of your system first, as this, like all conversions, may result in considerable localized damage in the event of difficulties. I was able to cross-grade to the same CentOS/RHEL version way back when I did this. I'm not sure what the implications of cross-grading and upgrading at the same time might be. Probably a mess, so proceed with caution.

1) Clean up yum's cache:

yum clean all

2) Download the CentOS key (I just picked one of the CentOS mirrors, you can use anyone you like http://mirrors.centos.org)

wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5 

3) ... the release rpm and notes:

wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/centos-release-5-9.el5.centos.1.x86_64.rpm  
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/centos-release-notes-5.9-0.x86_64.rpm

4) ... yum

wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm  
wget http://mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/yum-updatesd-0.9-5.el5.noarch.rpm

5) Import the new KEY:

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

6) Remove the redhat release

rpm -e --nodeps redhat-release

7) ... and Redhat Network plugin

rpm -e yum-rhn-plugin

8) Install the RPMs you've just downloaded (make sure you don't have any other RPM's in your current directory first)

rpm -Uvh -force yum*.rpm centos*.rpm

9) Upgrade the system with packages from the new repositories:

yum upgrade

10) reboot.

I did this, again, several years ago and it worked exactly as advertised then. But and it's a large but, that was between the same version releases of RHEL and CentOS.

RHEL and CentOS are pretty darn stable, so this would probably still work. If if were any other non-enterprise release, I'd, without hesitation, recommend you reinstall. However, as it is.... it just might work.

share|improve this answer
    
Depricated versions of CentOS are available from the CentOS Vault. They would just need to select their bit version and pull the release file from the "CentOS" folder. –  Mono May 2 '13 at 13:31
    
Good to know about the vault (I didn't, clearly). –  SuperMagic May 2 '13 at 15:35
    
Thanks, this helped a lot. I would only add: -in my case it required also package mirrors.cat.pdx.edu/centos/5/os/x86_64/CentOS/… -I add to change slightly package name for the 2 release packages. I think because of versioning even if I was using version 5 branch as well. –  user341945 Jul 7 at 13:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.