赞
踩
cat /etc/redhat-release
vi /etc/yum.repos.d/upgrade.repo
[upgrade]
name=upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enable=1
gpgcheck=0
yum install redhat-upgrade-tool preupgrade-assistant-contents -y
由于centos 6.5自带的助手之一版本较高,所以需要卸载了装个更老的:
yum erase openscap -y
yum install redhat-upgrade-tool preupgrade-assistant-contents -y
No package redhat-upgrade-tool available
这个时候你可以通过在线安装RMP包解决。
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.0.5.el6.centos.noarch.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm -y
preupg -s CentOS6_7
升级检测通过后,在线下载centos7镜像,或者通过sftp本地上传。
先导入RPM签名证书
rpm --import https://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-7
centos-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64
注意
在线更新很慢,因为是要链接到centos的备份地址官网进行更新,所以有另外个选择:本地更新
利用下载好的镜像进行本地更新:
wget https://archive.kernel.org/centos-vault/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso
centos-upgrade-tool-cli --iso=/home/CentOS-7-x86_64-DVD-1511.iso
(如果有问题可以加–force参数,但生产环境不建议)
这两种方式的区别就是,在线的话是先更新好,然后重启。本地的话是先重启,然后重启过程中进行更新。
升级完成后,重启进入新系统。
setup
reboot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。