I was setting up some test environments and didn’t want to bother with Red Hat Network. Rather than creating a CentOS machine from scratch, I converted a Redhat Enterprise Linux 5 machine to CentOS 5. Here are the commands I ran.
yum clean all
rpm –import RPM-GPG-KEY-CentOS-5
rpm -e –nodeps redhat-release
rpm -e yum-rhn-plugin
rpm -Uvh –force *.rpm
I’m not quite sure if it totally worked, because I see some packages being updated with a suffix of .el5 rather than .centos (I haven’t really used CentOS before, this may be normal), but the RHN messages are gone.