Installing Redhat upgrade tool:
redhat-upgrade-tool is not available on standard repositories, you must set up the repository to install it.
# vi /etc/yum.repos.d/upgrade.repo
Place the following entries in it.
[upgrade] name=upgrade baseurl=http://dev.centos.org/centos/6/upg/x86_64/ enabled=1 gpgcheck=0
Install the following packages.
# yum -y install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant
PreUpgrade Assistant:
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:
The output of preupg command has been shorted to reduce the length of the post.
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/
This may result in an error:
setting up repos... .treeinfo | 1.1 kB 00:00 preupgrade-assistant has not been run. To perform this upgrade, either run preupg or run redhat-upgrade-tool --force
So, re-run the redhat-upgrade-tool with the –force option (not recommended, but this is only solution as of now)
# redhat-upgrade-tool --network 7.0 --force --instrepo http://centos.excellmedia.net/7.0.1406/os/x86_64/
On finish, Reboot to start upgrade.
# reboot
Upgrade toCentOS 7:
The server will boot with the redhat-upgrade-tool kernel to upgrade the CentOS 6, now you can find the up-gradation activity via console.
Now you can see the installation of the packages.
Once completed, you will get the login screen.
Verify using the following command.
# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core)
That’s All!