Upgrading CentOS 6.x to CentOS 7.x
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.
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
The output should be similar to as follows
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
Gathering logs used by
All installed packages : 01/10 ...finished (time 00:00s)
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
043/100 ...done (CUPS Browsing/BrowsePoll configuration)
044/100 ...done (CVS Package Split)
|samba shared directories
|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.
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
rpm --import http://isoredirect.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
Run the following command to perform the upgradation.
--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