1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。 阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/ CentOS系统更换软件安装源 第一步:备份你的原镜像文件,以免出错后可以恢复。 [root@f660c232f698 /]# 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 [root@f660c232f698 /]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 第三步:运行yum makecache生成缓存 [root@f660c232f698 /]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras updates Cleaning up Everything Cleaning up list of fastest mirrors [root@f660c232f698 /]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base | 3.7 kB 00:00 base/group_gz | 219 kB 00:00 base/filelists_db | 6.3 MB 00:06 base/primary_db | 4.6 MB 00:04 base/other_db | 2.8 MB 00:02 extras | 3.4 kB 00:00 extras/filelists_db | 37 kB 00:00 extras/prestodelta | 703 B 00:00 extras/primary_db | 34 kB 00:00 extras/other_db | 48 kB 00:00 updates | 3.4 kB 00:00 updates/filelists_db | 3.1 MB 00:03 updates/prestodelta | 471 kB 00:00 updates/primary_db | 4.0 MB 00:04 updates/other_db | 47 MB 00:47 Metadata Cache Created [root@f660c232f698 /]# |