CentOS 映像与镜像仓库
列表
使用说明
1、备份配置文件:
sudo cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、修改CentOS-Base.repo文件,取消baseurl开头的行的注释,并增加mirrorlist开头的行的注释。将文件中的http://mirror.centos.org替换成https://repo.huaweicloud.com(可修改为上面的网址),可以参考如下命令:
1 | sudo sed -i \ |
3、执行yum clean all清除原有yum缓存。
4、执行yum makecache(刷新缓存)或者yum repolist all(查看所有配置可以使用的文件,会自动刷新缓存)。
注意其中的*通配符,如果只需要替换一些文件中的源,请自行增删。
注意,如果需要启用其中一些 repo,需要将其中的 enabled=0 改为 enabled=1。
※ 提醒: CentOS 6 及以下版本已被官网源下线, 若需使用, 请参考 CentOS-Vault 进行配置.
相关网址
CentOS官方地址:http://www.centos.org/
CentOS邮件列表地址:http://www.centos.org/modules/tinycontent/index.php?id=16
CentOS论坛地址:http://www.centos.org/modules/newbb/
CentOS文档地址:http://www.centos.org/docs/
CentOS Wiki地址:http://wiki.centos.org/