添加升级工具的源 Cnetos 6.5 升级7.0

1、添加升级工具的源


[root@localhost ~]# more /etc/yum.repos.d/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


2、安装升级工具


    yum install redhat-upgrade-tool preupgrade-assistant-contents


3、导入GPG-KEY


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


4、进行系统升级评估,看升级有无风险


查看升级可用的目录


preupg -l


如果结果为CentOS6_7 ,继续执行:


preupg -s CentOS6_7


5、升级工具(force强制升级)


    sudo centos-upgrade-tool-cli --network 7 --force --instrepo=http://mirror.centos.org/centos/7/os/x86_64/


    


     如果出现下面error 再执行下sudo centos-upgrade-tool-cli --network 7 --force --instrepo=http://mirror.centos.org/centos/7/os/x86_64/


     Downloading failed: Errors were encountered while downloading packages.


    


     全部完成后会提示重启


     testing upgrade transaction


rpm transaction 100% [===============================================================================================]


rpm install 100% [===================================================================================================]


setting up system for upgrade


Finished. Reboot to start upgrade.


    


6、软件包下载完成后,按照提示重启机器,等待升级完成。



Linux_shell高级运维派 QQ:459096184

期待你的加入,一起讨论学习。


本文出自 “yango” 博客,转载请与作者联系!

你可能感兴趣的:(系统升级,6.5,cnetos,升级7.0)