Tuesday, December 10, 2019

Upgrading cent OS 6 To 7

As per the CentOS 7 announcement, it is possible to upgrade the CentOS 6 to CentOS 7 with the help of redhat-upgrade-tool. CentOS has not yet posted any official document on upgrading the CentOS 6, since there is no official documentation; we are not recommending this upgrade on production environment. If you like to give a try on development, you can just follow the simple steps.

[Index]
1.Installing CentOS upgrading tool.
2.Preupgrade Assistance.
3.Perfrom Upgrade.

1. Installing CentOS Upgrading Tool.


redhat-upgrade-tool is not available on standard repositories, you must setup the repository to install it.
# vi /etc/yum.repos.d/upgrade.repo
Copy and Paste Follow To That file. and Then Press ctrl+o then type :wq to Save and exit from file.


[upgrade]
name=upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enabled=1
gpgcheck=0
Now Install Following packages.
# yum -y install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant

if Followin error occur Then Do as per Describe Below.

I/O warning : failed to load external entity "/usr/share/openscap/xsl/security-g                uide.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 40 element impo                rt
xsl:import : unable to load /usr/share/openscap/xsl/security-guide.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/oval-repor                t.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 41 element impo                rt
xsl:import : unable to load /usr/share/openscap/xsl/oval-report.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/sce-report                .xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 42 element impo                rt
xsl:import : unable to load /usr/share/openscap/xsl/sce-report.xsl
OpenSCAP Error:: Could not parse XSLT file '/usr/share/preupgrade/xsl/preup.xsl'                 [oscapxml.c:416]
Unable to open file /root/preupgrade/result.html
Usage: preupg [options]

preupg: error: [Errno 2] No such file or directory: '/root/preupgrade/result.htm                l'
Step To Resolve.

 yum erase openscap
 yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
yum install redhat-upgrade-tool preupgrade-assistant-contentsyum install redhat-upgrade-tool preupgrade-assistant-contents

After Successfully installation .Do Following step.


2.Preupgrade Assistance.

Run the following command to check the potential problem you might encounter with an upgrade from CentOS 6 to CentOS 7 before making a changes to the system.
# preupg
Note: Output of preupg command has been shorted to reduce the length of the post.

|System kickstart                                                                                            |notapplicable  |
|YUM                                                                                                         |notapplicable  |
|Check for usage of dangerous range of UID/GIDs                                                              |notapplicable  |
|Incorrect usage of reserved UID/GIDs                                                                        |notapplicable  |
|NIS ypbind config files back-up                                                                             |notapplicable  |
|NIS Makefile back-up                                                                                        |notapplicable  |
|NIS server maps check                                                                                       |notapplicable  |
|NIS server MAXUID and MAXGID limits check                                                                   |notapplicable  |
|NIS server config file back-up                                                                              |notapplicable  |
------------------------------------------------------------------------------------------------------------------------------
Tarball with results is stored here /root/preupgrade-results/preupg_results-140716022514.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .
From the above you can find what all are the packages and application will be affected by this upgrade, if you are ok with it; you can go ahead for the next step.

After Done.Transfer Report File To html Directory And Check Errors.

cp /root/preupgrade/ /var/www/html/

chmod 0755 /var/www/html/preupgrade/

if All Test will Passed Then You Perform To upgrade Or Error Then See Discription And if No issue with That error Then Do upgrade.otherwise You Have to Changed as per Error.


3.Perform Upgrade.

We are going to use the repo file for the upgrade, issue the following command to import the GPG key.


# rpm --import http://centos.excellmedia.net/7.0.1406/os/x86_64/RPM-GPG-KEY-CentOS-7
As per the man page, the following command is used to upgrade the CentOS 6; this will download the packages from the internet.
# redhat-upgrade-tool --network 7.0 --instrepo http://centos.excellmedia.net/7.0.1406/os/x86_64/
But when i issued the command, it gave me the error to re-run the preupgrade-assistant again. I tried multiple times but no luck.

No comments:

Post a Comment

 Dear all, Kindly Check Out skynetconsult.in For More Blog. Regards, skynetConsultacy.