読者です 読者をやめる 読者になる 読者になる

centos6.2 -> centos7 バージョンアップ

### 念のため、chkconfig --listを取っておきましょう!
$ yum update -y
$ reboot

$ vim /etc/yum.repos.d/CentOS-Base.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 -y openscap pcre-devel libxml2-devel libxslt-devel m2crypto python-simplejson
$ yum install -y mod_wsgi redhat-upgrade-tool preupgrade-assistant-contents

### 一覧を確認し、対象にアップグレード
$ preupg --list
$ rpm -qa | grep openscap
openscap-1.2.8-2.el6.centos.x86_64
# rpm -Uhv --oldpackage http://dev.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm

$ preupg -s CentOS6_7
Do you want to continue? y/n  ###y

$ rpm --import http://ftp.plusline.de/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
### ⬆を行わないと、下記のように怒られる
### Downloading failed:The GPG keys listed for the "CentOS-7.0 - Base" repository are already installed but they are not correct for this package. 

$ redhat-upgrade-tool-cli --network 7.0 --instrepo http://mirror.centos.org/centos/7/os/x86_64/ --force
Continue with the upgrade [Y/N]?  ### y