CentOS 升级到指定版本(示例:centos7.5)

本文介绍了如何将CentOS系统升级到指定版本,如7.5。首先,查看当前系统版本,然后修改yum源为阿里云源,并确认更新仓库包含所需版本。接着,检查可用仓库,最后执行更新操作。

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

一、查看当前系统版本

# rpm -q centos-release
或
# cat /etc/redhat-release

二、修改yum源,确定更新仓库版本

CentOS 7的更新源在/etc/yum.repos.d/目录下,由于我已经将yum源更换为阿里云的yum源,配置文件如下,更换:

name=CentOS-7.5.1804 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.5.1804/os/$basearch/
        http://olcentchan.chinacloudapp.cn/centos/7.5.1804/os/$basearch/
        http://olcentchan.chinacloudapp.cn/centos/7.5.1804/os/$basearch/
gpgcheck=1
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-7.5.1804 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.5.1804/updates/$basearch/
        http://olcentchan.chinacloudapp.cn/centos/7.5.1804
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值