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/阿里雲