CentOS6.x upgraded to CentOS7
In just a few weeks after the release of Red Hat Enterprise 7, centos7 was also released, and included the equally exciting features as red hat. In addition to the long-awaited systemd and popular Docker, this release also makes it possible for the system to automatically update from version 6 to version 7 without installing the image file. Although the upgrade still needs to be restarted, it is not a live upgrade, but it is very convenient for servers that can only be accessed remotely.
RedHat has already released and documented necessary update tools. The CentOS team was too late to import, test, and rebuild tools, but developers had already begun-and they provided untested binary files.
Please note: since these packages have not been tested, you should not, in any way, you can try it on a machine that is easy to redeploy without any valuable data, except for a backup testing machine. Never try it on the production machine!
However, if you want to get a preliminary idea of how the tool works in general, I recommend that you create a simple CentOS 6 virtual machine, install as few packages as possible and all system updates. Then install the rpm from the CentOS Library mentioned above.
There is a Preupgrade Assistant among these rpm, which can be safely executed on the system: the preupg is only an analysis system and does not execute any tasks, after execution, it will provide some suggestions to tell the update program what to search for during the update.
Since I only run on a system with few services installed, I did not get the actual result after running preupg. Even a system with more services installed has the same result (there are many rows, so only some rows are shown as an example );
$sudopreupgPreupgtooldoesn'tdotheactualupgrade.Pleaseensureyouhavebackedupyoursystemand/ordataintheeventofafailedupgradethatwouldrequireafullre-installofthesystemfrominstallationmedia.Doyouwanttocontinue?y/nyGatheringlogsusedbypreupgradeassistant:Allinstalledpackages:01/10...finished(time00:00s)Allchangedfiles:02/10...finished(time00:48s)Changedconfigfiles:03/10...finished(time00:00s)Allusers:04/10...finished(time00:00s)...042/100...done(sambashareddirectoriesselinux)043/100...done(CUPSBrowsing/BrowsePollconfiguration)044/100...done(CVSPackageSplit)...|sambashareddirectoriesselinux|notapplicable||CUPSBrowsing/BrowsePollconfiguration|notapplicable||CVSPackageSplit|notapplicable|...
As mentioned above, Preupgrade Assistant only helps analyze what problems will occur during the update process-the actual steps need to be completed using lredhat-upgrade-tool-cli. tool. To make this tool work effectively, you must first import the CentOS 7 key:
$sudorpm--importhttp://isoredirect.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
Then, the actual upgrade tool is called. The corresponding options are the future release version and the URL of the downloaded data. In addition, this tool will issue a warning for the preupg not running in advance, so I have to add the -- force option to block it, although this warning is correct. Once the upgrade tool is called, some necessary information, packages and images will be downloaded, and then it will request a restart, which will not automatically happen.
$sudo/usr/bin/redhat-upgrade-tool-cli--force--network7--instrepo=http://mirror.centos.org/centos/7/os/x86_64settinguprepos....treeinfo|1.1kB00:00gettingbootimages...
After the machine is restarted, it will use the downloaded package to start updating itself. The resolution time varies depending on the processing speed of the machine. It is expected to be several minutes instead of several seconds. In any case, if everything runs normally, the next login will go to the CentOS 7 interface.
$cat/etc/os-releaseNAME="CentOSLinux"VERSION="7(Core)"ID="centos"ID_LIKE="rhelfedora"VERSION_ID="7"PRETTY_NAME="CentOSLinux7(Core)"ANSI_COLOR="0;31"CPE_NAME="cpe:/o:centos:centos:7"HOME_URL="https://www.centos.org/"BUG_REPORT_URL="https://bugs.centos.org/"
Conclusion: The upgrade tool runs well. Although it is not comparable to a real live upgrade, it provides a very good way to upgrade remote servers. I tested a clean virtual machine and a bare computer, remote server, and upgrading tool. They all worked exceptionally well. Unfortunately, the analysis tool didn't work as I expected, probably because it was not tested or I didn't use it correctly. With the passage of time, I look forward to how the upgrading tool will develop and improve. However, once again, as mentioned above-do not try it on your product server.
Address: http://www.oschina.net/translate/centos-6-to-centos-7-upgrade-procedure
Address: http://vexxhost.com/blog/centos-6-to-centos-7-upgrade-procedure/