Convert RH/OL To CentOS

From The Linux Source
Revision as of 12:23, 14 June 2017 by Support (Talk | contribs)

Jump to: navigation, search

Notes: only tested on RedHat 6, currently adding RedHat 5 steps.
'cat /etc/redhat-release' shows RedHat or Oracle before these steps

1. browse to the centos repo to get the link for the latest centos-release package, right-click/copy link/url

2. wget the package/url (may need to specify a proxy) (or use 'curl --proxy -O')

# wget 
# wget
# wget

3. install centos-release (plus release notes dependency for RedHat 5) and remove redhat-release
Note: 'cat /etc/redhat-release' shows CentOS after this step

RedHat 5
# rpm -i --force centos-release-5-11.el5.centos.x86_64.rpm centos-release-notes-5.11-0.x86_64.rpm
# rpm -e redhat-release-5Server redhat-release-notes-5Server
RedHat 6
# rpm -i --force centos-release-6-8.el6.centos.12.3.x86_64.rpm
# rpm -e redhat-release-server
RedHat 7
# rpm -e --nodeps redhat-release-server
# rm -rf /usr/share/redhat-release /usr/share/doc/redhat-release /etc/system-release-cpe.rpmsave /etc/os-release.rpmsave
# rpm -i --force centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm

4. system can now be subscribed to CentOS spacewalk channel with --force option, or add CentOS-Base.repo to /etc/yum.repos.d/CentOS-Base.repo

5. remove additional RedHat packages and replace with corresponding CentOS packages

RedHat 5
# yum update redhat-logos
# rpm -e redhat-support-tool redhat-support-lib-python Deployment_Guide-en-US htmlview redhat-menus
NOTE : order is important for RPM dependencies
RedHat 6
# rpm -e --nodeps redhat-indexhtml
# yum install centos-indexhtml
# yum update redhat-logos
# rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights
IF you see a yum message about lynx-2.x.x-xx.el6.x86_64 has missing requires of redhat-indexhtml
# yum reinstall lynx
RedHat 7
# rpm -e --nodeps redhat-indexhtml redhat-logos
# yum install centos-indexhtml centos-logos
# yum update abrt redhat-menus
# rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights