centos6更新yum源為阿里雲
阿新 • • 發佈:2018-12-26
[1] 首先備份/etc/yum.repos.d/CentOS-Base.repo
centos5:
[4] 執行yum makecache生成快取
參考連結:
centOS更改yum源與更新系統
超簡單將Centos的yum源更換為國內的阿里雲源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[2] 進入yum源配置檔案所在資料夾
cd /etc/yum.repos.d/
[3] 下載163或者阿里雲的yum源配置檔案,放入/etc/yum.repos.d/(操作前請做好相應備份)
163:wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
centos5:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
centos6:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
centos7:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[4] 執行yum makecache生成快取
yum makecache
[5] 更新系統
yum -y update
參考連結:
centOS更改yum源與更新系統
超簡單將Centos的yum源更換為國內的阿里雲源