如何替换linux的yum源

 时间:2026-02-12 12:02:34

1、从镜像站点里面选中自己的linux版本

2、备份自身的yum源

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

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

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

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

CentOS 7

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

4、之后运行yum makecache生成缓存

5、操作完以上步骤即完成了yum源的替换

  • C#开发程序无法修改系统时间解决办法
  • Windows Server2008如何安装IIS和FTP
  • Thinkphp的环境部署
  • Windows7上开启ftp服务器功能
  • vsftpd文件传输系统安装及配置
  • 热门搜索
    炖羊肉放什么调料 matter什么意思 eye是什么意思 什么是一元一次方程 送男朋友什么礼物好 什么赚钱 山竹是什么 砥砺前行是什么意思 两个人在一起最重要的是什么 什么是内能