centos8 yum替換阿里源


解決centos7使用yum安裝mysql 下載速度慢的問題

 

挺好用的,之前用騰訊雲安裝了半天,太慢了,改過之后速度快多了。

 

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、下載ailiyun的yum源配置文件到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

 

 

3、運行yum makecache生成緩存
yum makecache

 

 

4、這時候再更新系統就會看到以下mirrors.aliyun.com信息
yum -y update

 

已加載插件:fastestmirror, refresh-packagekit, security

 

設置更新進程Loading mirror speeds from cached hostfile

 

* base: mirrors.aliyun.com

 

* extras: mirrors.aliyun.com

 

* updates: mirrors.aliyun.com
 
 
如果你覺得以上步驟麻煩可以執行我的一鍵腳本
curl -O http://dshvv.oss-cn-beijing.aliyuncs.com/ialiyum.sh && chmod 755 ./ialiyum.sh && ./ialiyum.sh  && rm -rf ./ialiyum.sh

(其它一鍵系列: https://www.cnblogs.com/dshvv/p/13129975.html)




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM