CentOS之yum映象源
阿新 • • 發佈:2018-12-09
mirrors.163.com和aliyun源
1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、進入yum源配置檔案所在的資料夾
cd /etc/yum.repos.d/
3、下載yum源配置檔案到上面那個資料夾內
163的yum源配置檔案
##CentOS7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo ##CentOS6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo ##CentOS5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
ailiyun的yum源配置檔案
#Centos-7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.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.aliyun.com/repo/Centos-5.repo
4、執行yum makecache生成快取
yum makecache
5、執行yum makecache日誌資訊
[[email protected] ~]# yum -y update 已載入外掛:fastestmirror, refresh-packagekit, security 設定更新程序Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com ## 或者是 已載入外掛:fastestmirror, refresh-packagekit, security 設定更新程序Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com