Steps to Upgrade from CentOS 6 to CentOS 7

Upgrading CentOS 6.x to CentOS 7.x

Step 1.A
Make sure that you have updated your current version of CentOS 6.x to the latest version copy of CentOS (Should be 6.5 or above).

Note: Move to Step 1.B if your current system is already up to date.

You can perform the update using following command

# yum update

This will upgrade all of your system software as well as their dependencies to the latest version.

Step 1.B
Now once we have the system updated to the latest, we can perform the upgradation. First, you will need to run a program that will scan your system and determine what your upgrade status is. This program is called the ‘Preupgrade Assistant‘.

On your command prompt type the following

sudo preupg

The output should be similar to as follows

sudo preupg
Preupg tool doesn't do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade
that would require a full re-install of the system from installation media.
Do you want to continue? y/n

y

Gathering logs used by preupgrade assistant:

All installed packages : 01/10 ...finished (time 00:00s)
All changed files : 02/10 ...finished (time 00:48s)
Changed config files : 03/10 ...finished (time 00:00s)
All users : 04/10 ...finished (time 00:00s)
...
042/100 ...done (samba shared directories selinux)
043/100 ...done (CUPS Browsing/BrowsePoll configuration)
044/100 ...done (CVS Package Split)
...
|samba shared directories selinux |notapplicable |
|CUPS Browsing/BrowsePoll configuration |notapplicable |

NOTE: The Preupgrade assistant does not perform the upgradation but only tells you if there will be any issues while performing an upgrade. It is recommended you perform this task to know for sure if the upgradation will be successful.

Step 2
We now move to the next step which is to obtain the CentOS 7 key before we run the final process of upgradation. You can import the key using following command

Step 3
Run the following command to perform the upgradation.

sudo /usr/bin/redhat-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64

After you run the above command, the upgrade process retrieves new Boot Images and downloads the necessary packages and then will ask for a reboot.

The system may perform several reboots during this process and should successfully upgrade the current CentOS to version 7.x.
you can run the following command to check the new version of your system

# cat /etc/centos-release

Sample Output:

CentOS Linux release 7.4.1708
 
Before upgrading please submit a support request so we can create a full backup of your system if you have our backup services or a VPS.

kbadmin has written 147 articles

Loading Facebook Comments ...

This site uses Akismet to reduce spam. Learn how your comment data is processed.