阿里云Linux安装软件镜像源
阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/
- 备份原镜像文件,出错后可以恢复
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- 下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -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
- 运行yum makecache生成缓存
yum clean all
yum makecache
本文详细介绍了如何在Linux环境下配置阿里云的软件镜像源,包括备份原镜像文件、下载新的CentOS-Base.repo文件以及针对不同版本的CentOS进行具体操作,最后通过运行yum命令生成缓存,确保软件包的高效下载。
4446

被折叠的 条评论
为什么被折叠?



