Linux配置阿里源

本文详细介绍了如何在 CentOS 7 中更换阿里云源,包括备份原有仓库配置、下载并更新新的 CentOS 和 EPEL 源配置文件,以及清理和生成缓存的方法。

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

centos7

仓库地址:https://mirrors.aliyun.com/repo/

# 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel.repo
wget -O /etc/yum.repos.d/epel-testing.repo http://mirrors.aliyun.com/repo/epel-testing.repo
# 生成缓存
yum clean all
yum makecache

更多请参考:

  1. centos
  2. ubuntu
  3. archlinuxcn
  4. blackarch
  5. blackarch中科大源
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值