簡介
CentOS,是基于Red Hat Linux提供的可自由使用源代碼的企業級Linux發行版本;是一個穩定,可預測,可管理和可復制的免費企業級計算平臺。
下載地址:?centos安裝包下載_開源鏡像站-阿里云
相關倉庫:
-
CentOS過期源(centos-vault):centos-vault鏡像_centos-vault下載地址_centos-vault安裝教程-阿里巴巴開源鏡像站
-
CentOS arm源(centos-altarch):centos-altarch鏡像_centos-altarch下載地址_centos-altarch安裝教程-阿里巴巴開源鏡像站
-
CentOS Stream源(centos-stream):centos-stream鏡像_centos-stream下載地址_centos-stream安裝教程-阿里巴巴開源鏡像站
-
CentOS debuginfo源(centos-debuginfo):centos-debuginfo鏡像_centos-debuginfo下載地址_centos-debuginfo安裝教程-阿里巴巴開源鏡像站
配置方法
通知:CentOS 8操作系統版本結束了生命周期(EOL),Linux社區已不再維護該操作系統版本。建議您切換到Anolis或Alinux。如果您的業務過渡期仍需要使用CentOS 8系統中的一些安裝包,請根據下文切換CentOS 8的源。
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/
centos8(centos8官方源已下線,建議切換centos-vault源)
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
centos6(centos6官方源已下線,建議切換centos-vault源)
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.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
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