GNU/Linux >> Linux の 問題 >  >> Cent OS

RedHatアップグレードツールを使用してCentOSを6.xからCentOS7にアップグレードする方法は?

これを待っていましたか?少なくとも、私はそうだった。私はOS全体をアンインストールして最新バージョンをインストールするのが好きではありませんが、CentOS 7がリリースされるまで選択肢がありませんでした。つまり、CentOS 7には、CentOS6からアップグレードできるインプレースアップグレード機能が付属しています。 OS全体をアンインストール/フォーマットせずにxから7まで。なんてクールなの?

公式の方法を使用して、CentOS6.xから7にアップグレードします。

関連する手順:

  1. 「root」権限が必要です
  2. アップグレード前アシスタントツールを使用してOSをスキャンします。
  3. CentOS7GPGキーをインポートする
  4. RedHatアップグレードツールを使用したアップグレード
Disclaimer:

Although we are going to follow official upgradation method, there are chances that the upgrade might fail. There are plenty of reasons - this method is still not matured enough to handle packages that were not installed from official repositories. For instance, if you had installed packages from EPEL repository or any other third party repos, then those packages might have problems. It's advised to try upgradation procedure on a freshly installed CentOS 6.x. Follow this tutorial at your own risk and Techglimpse or the author is not responsible if the process didn't work for you.

PreupgradeAssistantToolを使用してOSをスキャンする

「アップグレード前のアシスタントツール」をインストールする

  • リポジトリファイルを作成する
    • $ vim /etc/yum.repos.d/upgradetool.repo
  • 以下の行をコピーしてupgradetool.repoに貼り付けます
    • [upg]
      name=CentOS-$releasever - Upgrade Tool
      baseurl=http://dev.centos.org/centos/6/upg/x86_64/
      gpgcheck=1
      enabled=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  • アップグレード前アシスタントツールのインストール
    • #yum install redhat-upgrade-tool preupgrade-assistant-contents

preupgを使用してスキャン

#preupg

注: preupgの実行中にエラーが発生した場合は、Pythonのバージョンを確認する必要があります。エラーの詳細については、ここをクリックしてください。

Preupgrade Assistant Toolは、オペレーティングシステム全体をスキャンし、さまざまなパッケージとそのアップグレードステータスのレポートを作成します。

サンプル出力:

#preupg
::::::::::::::::::::::::::::::::::::::::::::
|device-mapper-multipath configuration compatibility check
|fixed |
|Configuration Files to Review
|needs_inspection |
|File Lists for Manual Migration
|needs_inspection |
|Obsoleted rpms
|needs_inspection |
|Binary rebuilds
|needs_inspection |
|Python 2.7.5
|needs_inspection |
|Check for usage of dangerous range of UID/GIDs
|needs_inspection |
|Packages not signed by CentOS
|needs_action |
|Removed rpms
|needs_action |
|General
|needs_action |
|Sonamebumped libs
|needs_action |
|Content for enabling and disabling services based on CentOS 6 system
|needs_action |
|User modification in /etc/rc.local and /etc/rc.d/rc.local
|needs_action |
|cgroups configuration compatibility check
|needs_action |
--------------------------------------------------------------------------------
-------------------------------
Tarball with results is stored here /root/preupgrade-results/preupg_results-1512
15073258.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some potential in-place upgrade risks.
Read the file /root/preupgrade/result.html for more details.
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .

注:アップグレード前の結果を注意深く読み、アップグレードプロセスを開始する前に問題を理解してください。

CentOSGPGキーのインポート

#rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7

注: YUMGPGキーについてもっと知りたい

redhat-upgrade-tool-cliを使用して、CentOS6.xから7にアップグレードします

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

サンプル出力:

::::::::::::::::::::::::::::::::::::
INPLACERISK: MEDIUM: having one of [nss elfutils-libs audit-libs gdisk libX11-common ca-certificates glusterfs kpartx openscap pixman libxcb libX11 firefox
tzdata nspr elfutils-libelf openldap glusterfs-api device-mapper-multipath libnl3 mdadm glusterfs-libs nss-sysinit nss-tools spice-server device-mapper-
multipath-libs netcf-libs libdrm libpciaccess audit-libs-python gtk2 audit nss-util] package installed breaks upgrade
INPLACERISK: MEDIUM: a number of default configuation settings have changed in CentOS7. Users should verify that their devices are still optimally configured
INPLACERISK: MEDIUM: We detected some soname bumps in the libraries installed on the system. This may break the functionality of some of your 3rd party
applications. They may need rebuild. Please check their requirements.
INPLACERISK: MEDIUM: We detected some .so libraries installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of
some of your 3rd party applications.
:::::::::::::::::::::::::::::::::
INPLACERISK: SLIGHT: Some binaries untracked by RPM were discovered on the system and may need rebuild after upgrade.
INPLACERISK: SLIGHT: Some scripts untracked by RPM were discovered on the system and may not work properly after upgrade.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/_markerlib is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/argparse-1.4.0.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/gluster is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/ioprocess is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/mom is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pip is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pip-7.1.2.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/pkg_resources is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/setuptools-18.3.2.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/vdsm is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/virtualenv_support is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/wheel is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/wheel-0.26.0.dist-info is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/yajsonrpc is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/zombiereaper is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/cpopen is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/gtk-2.0 is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/pycrypto-2.6.1-py2.6.egg-info is not owned by any RPM package.
INPLACERISK: NONE: Custom selinux configuration has been saved and it will be restored by a postupgrade script after the system upgrade.
:::::::::::::::::::::::::::::::::::::::::::::::
Y
:::::::::::::::::::::::::::::::::::::::::::::::::::
(651/662): xz-libs-5.1.2-12alpha.el7.i686.rpm | 107 kB 00:00
(652/662): xz-libs-5.1.2-12alpha.el7.x86_64.rpm | 102 kB 00:00
(653/662): xz-lzma-compat-5.1.2-12alpha.el7.x86_64.rpm | 18 kB 00:00
(654/662): yajl-2.0.4-4.el7.x86_64.rpm | 39 kB 00:00
(655/662): yum-3.4.3-132.el7.centos.0.1.noarch.rpm | 1.2 MB 00:01
(656/662): yum-metadata-parser-1.1.4-10.el7.x86_64.rpm | 28 kB 00:00
(657/662): yum-plugin-fastestmirror-1.1.31-34.el7.noarch | 30 kB 00:00
(658/662): yum-utils-1.1.31-34.el7.noarch.rpm | 113 kB 00:00
(659/662): zip-3.0-10.el7.x86_64.rpm | 260 kB 00:00
(660/662): zlib-1.2.7-15.el7.i686.rpm | 90 kB 00:00
(661/662): zlib-1.2.7-15.el7.x86_64.rpm | 89 kB 00:00
(662/662): zlib-devel-1.2.7-15.el7.x86_64.rpm | 50 kB 00:00
testing upgrade transaction
rpm transaction 100% [=========================================================]
rpm install 100% [=============================================================]
setting up system for upgrade
Finished. Reboot to start upgrade.

注:上記の手順には時間がかかり、アップグレードを完了するためにシステムが数回再起動します。プロセス中に、ブートイメージが取得され、再起動後にインストールを開始する前に、必要なパッケージがダウンロードされます。

centos-upgrade-tool」を使用することもできます。

再起動後:

Starting System Upgrade...
[ 28.890048] upgrade[1461]: starting upgrade hook
[ 28.963833] upgrade[1461]: preparing for upgrade...
[ 29.003036] upgrade[1461]: found 662 packages to install
[ 29.004901] upgrade[1461]: building RPM transaction, one moment...
[ 40.646364] upgrade[1461]: 662 packages to install, 461 to erase
[ 40.648261] upgrade[1461]: checking RPM transaction...
[ 41.609272] upgrade[1461]: non-fatal problems with RPM transaction:
[ 41.659882] upgrade[1461]: libpython2.6.so.1.0()(64bit) is needed by (installed) python-cheetah-2.4.1-1.el6.x86_64
[ 41.662478] upgrade[1461]: libpython2.6.so.1.0()(64bit) is needed by (installed) python-crypto-2.0.1-22.el6.x86_64
[ 41.664632] upgrade[1461]: libpython2.6.so.1.0()(64bit) is needed by (installed) python-iwlib-0.1-1.2.el6.x86_64
[ 41.666577] upgrade[1461]: libpython2.6.so.1.0()(64bit) is needed by (installed) python-cpopen-1.4-0.el6.x86_64
:::::::::::::::::::::::::::::::::::::::

もう一度再起動すると、システムがCentOS7に正常にアップグレードされます。


Cent OS
  1. CentOS 6.1 /CentOS6.0からCentOS6.2にアップグレードします

  2. CentOS6.3からCentOS6.4にアップグレードします

  3. CentOS6からCentOS7にアップグレードします

  1. CentOS6.9-6.0からCentOS6.10をアップグレードする方法

  2. CentOS7.8をCentOS7.7-7.0からアップグレードする方法

  3. CentOS7をCentOS8にアップグレードする方法

  1. CentOS6でGitバージョン>=1.7.10をアップグレードする方法

  2. Centos8でSaltを使用する方法

  3. CentOS7をCentOS8Linuxにアップグレードする方法