Difference between revisions of "Convert RH/OL To CentOS"

From The Linux Source
Jump to: navigation, search
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Notes: only tested on RedHat 6, currently adding RedHat 5 steps.<br>
+
Note: 'cat /etc/redhat-release' shows RedHat or Oracle before these 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
 
1. browse to the centos repo to get the link for the latest centos-release package, right-click/copy link/url
Line 6: Line 5:
 
  http://mirror.centos.org/centos/6/os/x86_64/Packages
 
  http://mirror.centos.org/centos/6/os/x86_64/Packages
 
  http://mirror.centos.org/centos/7/os/x86_64/Packages
 
  http://mirror.centos.org/centos/7/os/x86_64/Packages
2. wget the package/url (may need to specify a proxy) (or use 'curl --proxy sc9-proxy.example.net:3128 -O http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm')
+
2. wget the package/url (may need to specify a proxy, or use 'curl --proxy sc9-proxy.example.net:3128 -O http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm')
 
  ENT 5
 
  ENT 5
 
  # wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-11.el5.centos.x86_64.rpm  
 
  # wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-11.el5.centos.x86_64.rpm  
 
  [http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.11-0.x86_64.rpm
 
  [http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.11-0.x86_64.rpm
 
  ENT 6
 
  ENT 6
  # wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm
+
  # wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-9.el6.centos.12.3.x86_64.rpm
 
  ENT 7
 
  ENT 7
 
  # wget http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-3.1611.el7.centos.x86_64.rpm
 
  # wget http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-3.1611.el7.centos.x86_64.rpm
Line 20: Line 19:
 
  # rpm -e redhat-release-5Server redhat-release-notes-5Server
 
  # rpm -e redhat-release-5Server redhat-release-notes-5Server
 
  RedHat 6
 
  RedHat 6
  # rpm -i --force centos-release-6-8.el6.centos.12.3.x86_64.rpm
+
  # rpm -i --force centos-release-6-9.el6.centos.12.3.x86_64.rpm
 
  # rpm -e redhat-release-server
 
  # rpm -e redhat-release-server
 
  RedHat 7
 
  RedHat 7
 
  # rpm -e --nodeps redhat-release-server
 
  # 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
 
  # 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
+
  # rpm -i --force centos-release-7-3.1611.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
 
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
  
Line 31: Line 30:
 
  RedHat 5
 
  RedHat 5
 
  # yum update redhat-logos
 
  # yum update redhat-logos
  # rpm -e redhat-support-tool redhat-support-lib-python Deployment_Guide-en-US htmlview redhat-menus
+
  # rpm -e redhat-support-tool redhat-support-lib-python redhat-menus htmlview Deployment_Guide-en-US  
 
  NOTE : order is important for RPM dependencies
 
  NOTE : order is important for RPM dependencies
 
  RedHat 6
 
  RedHat 6
Line 37: Line 36:
 
  # yum install centos-indexhtml
 
  # yum install centos-indexhtml
 
  # yum update redhat-logos
 
  # yum update redhat-logos
  # rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights
+
  # rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights subscription-manager
 
  IF you see a yum message about lynx-2.x.x-xx.el6.x86_64 has missing requires of redhat-indexhtml
 
  IF you see a yum message about lynx-2.x.x-xx.el6.x86_64 has missing requires of redhat-indexhtml
 
  # yum reinstall lynx
 
  # yum reinstall lynx
Line 43: Line 42:
 
  # rpm -e --nodeps redhat-indexhtml redhat-logos
 
  # rpm -e --nodeps redhat-indexhtml redhat-logos
 
  # yum install centos-indexhtml centos-logos
 
  # yum install centos-indexhtml centos-logos
  # yum update abrt
+
  # yum update abrt redhat-menus
  # rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights
+
  # rpm -e redhat-support-tool redhat-support-lib-python redhat-access-insights subscription-manager Red_Hat_Enterprise_Linux-Release_Notes-7-en-US

Latest revision as of 13:50, 14 June 2017

Note: '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

http://mirror.centos.org/centos/5/os/x86_64/CentOS
http://mirror.centos.org/centos/6/os/x86_64/Packages
http://mirror.centos.org/centos/7/os/x86_64/Packages

2. wget the package/url (may need to specify a proxy, or use 'curl --proxy sc9-proxy.example.net:3128 -O http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-8.el6.centos.12.3.x86_64.rpm')

ENT 5
# wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-11.el5.centos.x86_64.rpm 
[http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.11-0.x86_64.rpm
ENT 6
# wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-9.el6.centos.12.3.x86_64.rpm
ENT 7
# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-3.1611.el7.centos.x86_64.rpm

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-9.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-3.1611.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 redhat-menus htmlview Deployment_Guide-en-US 
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 subscription-manager
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 subscription-manager Red_Hat_Enterprise_Linux-Release_Notes-7-en-US