CentOS 鏡像
簡介
CentOS,是基于 Red Hat Linux 提供的可自由使用源代碼的企業級 Linux 發行版本;是一個穩定,可預測,可管理和可復制的免費企業級計算平臺,
配置方法
1. 備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下載新的 CentOS-Base.repo 到 /etc/yum.repos.d/
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -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
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
CentOS 8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
3. 運行 yum makecache 生成快取
4. 其他
非阿里云ECS用戶會出現 Couldn't resolve host 'mirrors.cloud.aliyuncs.com' 資訊,不影響使用,用戶也可自行修改相關配置: eg:
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
相關鏈接
- 下載地址: 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/
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/116703.html
標籤:Linux
上一篇:Linux 切換 shell
下一篇:vi編輯器操作
