侧边栏壁纸
  • 累计撰写 119 篇文章
  • 累计创建 25 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

Centos7更换yum源为国内

梁来福
2024-05-13 / 0 评论 / 0 点赞 / 10 阅读 / 1328 字
温馨提示:
本文最后更新于 2024-06-06,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

yum源位置

/etc/yum.repos.d

备份

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

获取阿里源

# yum源
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 https://mirrors.aliyun.com/repo/epel-7.repo

更新cache

yum makecache

.........
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/86dde93e0f467fb45a3140712d908f154a611a3377a2de5b5f4c750881e48f6c-other.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/86dde93e0f467fb45a3140712d908f154a611a3377a2de5b5f4c750881e48f6c-other.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
正在尝试其它镜像。
(5/6): updates/7/x86_64/other_db                                                          | 1.6 MB  00:00:01
(6/6): base/7/x86_64/other_db                                                             | 2.6 MB  00:00:01
元数据缓存已建立

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin
博主关闭了所有页面的评论