linux如何换成阿里源

小伙伴们有时候在linux用yum命令下东西的时候速度非常慢,就是因为linux中centos7是默认国外源的,我们挂不了国外的代理,这个时候就要换一个国内源了,这里给大家介绍的是阿里源的替换命令!

1、打开yum源配置文件
cd /etc/yum.repos.d/
2、备份一下原有的源,防止后面出错
mv CentOS-Base.repo CentOS-Base.repo.back
3、执行命令
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4、清空yum 缓存
yum clean all
5、执行yum makecache
linux如何换成阿里源
即可

相关文章:

  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-05-14
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2021-10-24
  • 2022-12-23
  • 2021-05-15
  • 2021-12-11
  • 2022-12-23
相关资源
相似解决方案