yum國內鏡像配置

CentOS系統更換軟件安裝源緩存

base源
第一步:備份你的原鏡像文件,以避免出錯後能夠恢復。
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.repoget

CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo軟件

 

epel源下載

Epel 5
wget -O /etc/yum.repos.d/epel-5.repo http://mirrors.aliyun.com/repo/Cepel-5.repo
Epel 6
wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repoyum

Epel 7
wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repofilter


第三步:運行yum makecache生成緩存文件

yum clean all
yum makecachemake

相關文章
相關標籤/搜索