l11.CenterOS6.5升级到7

本文提供了一步一步的指导,教你如何从CentOS 6平滑升级到CentOS 7,包括软件配置、安装工具、升级前检查、下载安装包、重启更新及确认版本等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一:软件配置
vim /etc/yum.repos.d/upgrade.repo
[upgrade]
name=upgrade
baseurl=http://dev.centos.org/centos/6/upg/x86_64/
enable=1
gpgcheck=0 
二:安装软件工具
yum -y install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant
三:升级前检查潜在问题 
preupg
Preupg tool doesn't do the actual upgrade. 
Please ensure you have backed up your system and/or data in the event of a failed upgrade 
that would require a full re-install of the system from installation media.  Linux学习,http:// linux.it.net.cn 
Do you want to continue? y/n 
y
preupg --riskcheck --verbose 
四:下载安装包 
redhat-upgrade-tool --force --cleanup-post --network 7.0 --instrepo=http://mirror.centos.org/centos/7.0.1406/os/x86_64
请自行查看,如果7.0.1406下面没有文件,使用更高的版本
redhat-upgrade-tool --force --cleanup-post --network 7.0 --instrepo= http://mirror.centos.org/centos/7.2.1511/os/x86_64
如果失败可能是网络问题, 失败后再次执行该语句即可

由于此过程时间比较长,中间很可能因网络原因而中断,再次执行命令会接着上次出错的继续

五:重启机器更新

reboot

重启之后,机器会使用下载好的包开始更新自己,依据这机器的处理速度不同相应的解析时间会有所不同!

升级完成,而且文件系统的类型仍然是升级前的ext4

六:查看版本

 lsb_release -a

uname -r

 cat /etc/redhat-release





转载于:https://www.cnblogs.com/guominggigi/p/5333480.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值