Linux之从Centos 6.x 升级Centos7

1、安装升级工具依赖的软件包

yum -y install openscap pcre-devel libxml2-devel libxslt-devel m2crypto python-simplejson mod_wsgi

2、安装以下软件的最新版,可以到这里查找:http://dev.centos.org/centos/6/upg/x86_64/Packages

rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-36.0.1.el6.centos.x86_64.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.14-1.el6.centos.noarch.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-36.0.1.el6.centos.x86_64.rpm
rpm -ihv http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm

3、执行升级

redhat-upgrade-tool --network 7.0 --instrepo http://mirrors.sohu.com/centos/7.2.1511/os/x86_64/ --force

升级成功后会看到消息“Finished. Reboot to start upgrade.”
4、重启服务器
重启主机后,OS将启动一个称为System Upgrade的新的grub对象,支持将所有已经通过upgrade tool下载的软件包更新。
5、检查系统版本, 看到版本 CentOS Linux release 7.0.1406 (Core) 证明升级成功

cat  /etc/redhat-release

6、然后给升级的系统做更新,多执行几次,直到提示没有软件更新为止

yum clean all && yum makecache && yum update -y

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: