快捷导航

云服务器 Centos7 更换阿里源和腾讯源

[复制链接]
查看: 679|回复: 0
发表于 2023-6-29 15:36:39 | 显示全部楼层 |阅读模式
备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

复制代码

下载新的CentOS-Base.repo 到/etc/yum.repos.d/

阿里云

centos-6

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

centos-7

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

腾讯云

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo

复制代码

生成缓存并更新系统

yum clean all

yum makecache

yum list updates

yum -y update(更新内核)



yum -y upgrade(不更新内核)

复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

精彩推荐

尚云驿站

  • 投诉建议:350467567@qq.com
  • 软文投稿:350467567@qq.com
  • 友情链接:350467567@qq.com

云服务支持

精彩文章,快速检索

Copyright 尚云驿站  Powered by©  技术支持:飛    ( 闽ICP备2025116718号-15 )