码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2015-05-21 19:50:39      阅读:680      评论:0      收藏:0      [点我收藏+]

标签:系统升级 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安全顾问” 博客,转载请与作者联系!

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

标签:系统升级 cnetos 6.5 升级7.0

原文地址:http://chengyangyang.blog.51cto.com/9473151/1653506

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!