るいすのブログ

オタクエンジニアの雑記

CentOS 6 から CentOS 7 へのアップグレードのやり方


file5761311184311リバースプロキシ入れてから体感速度上がった気がしません?

CentOS 7を入れようと思ったんですけどどうもエラーが発生していて、CentOS 6.5からアップグレードをやってみました。 他の人とほとんど一緒なのですがエラーが吐いたのでそれの対処法でも

とりあえずアップデートを適用する。

[source] yum -y install reboot [/source]

アップグレードに必要なパッケージ類をインストールする。

[source] yum -y install openscap pcre-devel libxml2-devel libxslt-devel <span style="color: #000000;">m2crypto python-simplejson</span> [/source]

アップグレード用パッケージをインストールする。

[source] rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.el6.x86_64.rpm rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.el6.noarch.rpm rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.el6.x86_64.rpm rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/python-rhsm-1.9.7-1.el6.x86_64.rpm rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-1.el6.noarch.rpm [/source]

アップグレードコマンドを実行する。実行していいか聞かれるので y

[source] preupg -s RHEL6_7 [/source]

そしてこ

[source] redhat-upgrade-tool-cli --network 7.0 --instrepo http://mirror.centos.org/centos/7/os/x86_64/ --force --nogpgcheck [/source]

--nogpgcheckを付けないで実行をすると

[source] Downloading failed: The GPG keys listed for the “CentOS-7.0 – Base” repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. [/source]

こんなエラーを吐かれました。

あとは reboot を行って再起動します。