配置CentOS 7阿里云镜像源
簡介
CentOS,是基于 Red Hat Linux 提供的可自由使用源代碼的企業(yè)級 Linux 發(fā)行版本;是一個穩(wěn)定,可預(yù)測,可管理和可復(fù)制的免費企業(yè)級計算平臺。
配置方法
備份
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
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
CentOS 8
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
運行 yum makecache 生成緩存
其他
非阿里云ECS用戶會出現(xiàn) Couldn’t resolve host ‘mirrors.cloud.aliyuncs.com’ 信息,不影響使用。用戶也可自行修改相關(guān)配置: eg:
sed -i -e ‘/mirrors.cloud.aliyuncs.com/d’ -e ‘/mirrors.aliyuncs.com/d’ /etc/yum.repos.d/CentOS-Base.repo
相關(guān)鏈接
原文鏈接: https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11aZBkEq下載地址: https://mirrors.aliyun.com/centos/ https://mirrors.aliyun.com/centos-vault/ 官方主頁: http://www.centos.org/ 郵件列表: http://www.centos.org/modules/tinycontent/index.php?id=16 論壇: http://www.centos.org/modules/newbb/ 文檔: http://www.centos.org/docs/ Wiki: http://wiki.centos.org/總結(jié)
以上是生活随笔為你收集整理的配置CentOS 7阿里云镜像源的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ansible galaxy网址
- 下一篇: docker安装 kuboard v3