Focus on cloud service provider activities
Notes on website operation and maintenance

Record the process of upgrading CentOS6.8 to CentOS7 image (upgrade cautiously)

We netizens must be concerned that the official CentOS6. x version will not provide a security upgrade package. After all, we have seen that CentOS7+and even CentOS8 mirror versions have been released, and it is natural that the old version does not support and upgrade. However, we are sure that many servers and even website environments are using CentOS6. x version. After all, it has been used well for so many years, and we do not want to change the image.

To be prudent, it is suggested that when we make an inventory at the end of the year to sort out the operation and maintenance, Lao Zuo will also upgrade the image of the company's customers' website servers one after another to check how many CentOS6 systems are used. I usually adopt two strategies. If the server is about to be replaced, we will directly install CentOS7+, or install the currently used Ubuntu system. If the data is large, we may upgrade directly, but we need to do various backups to ensure that everything is safe.

Here I simply record the process of upgrading the test server from CentOS6.8 to CentOS7 image. For reference only, if we want to actually upgrade, we should make a good backup.

 Record the process of upgrading CentOS6.8 to CentOS7 image (upgrade cautiously)

Let's check the current image version.

cat /etc/redhat-release

Then we install the software package needed for the upgrade.

yum install openscap pcre-devel libxml2-devel libxslt-devel m2crypto python-simplejson mod_wsgi -y

Then install the latest version of the software.

rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-36.0.1.el6.centos.x86_64.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.14-1.el6.centos.noarch.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-36.0.1.el6.centos.x86_64.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm

Start upgrading.

redhat-upgrade-tool --network 7.0 --instrepo http://mirrors.sohu.com/centos/7.2.1511/os/x86_64/ --force

If we can see "Finished. Reboot to start upgrade.", it should be completed. We check the current version, and finally we need to upgrade the software package again.

yum clean all && yum makecache && yum update -y

If there is a fault during this period, we will check the problem again. However, the best way is to install it directly. There may be problems during the process. It is better to directly back up and re import the data.

Reference article: https://www.dwhd.org/20160622_213932.html

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Record the process of upgrading CentOS6.8 to CentOS7 image (upgrade cautiously)


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge