CentOS的yum源的服务器通常在国外,下载速度极慢,对yum源地址进行更改步骤以下:centos
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下载新的yum镜像文件到指定位置缓存
#阿里云 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 5 #wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo #网易源 Centos 5 #wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
3. 运行yum makecache生成缓存bash
yum clean all yum makecache
注:服务器
中科大的Linux安装镜像源:http://centos.ustc.edu.cn/
搜狐的Linux安装镜像源:http://mirrors.sohu.com/阿里云