Centos7更改yum源

1.進入目錄

cd /etc/yum.repos.d/

2.備份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

3.下載想要的源

#下載阿里雲的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4.清楚舊緩存數據,建立新的緩存

yum clean all
yum makecache
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章