Centos8 配置阿里雲yum源


1 進入yum目錄

[root@test-138 ~]# cd /etc/yum.repos.d/
[root@test-138 yum.repos.d]# ll
-rw-r--r-- 1 root root 810 Jan 9 21:26 CentOS-AppStream.repo
-rw-r--r-- 1 root root 788 Jan 9 21:24 CentOS-Base.repo
-rw-r--r-- 1 root root 832 Jan 9 21:26 CentOS-Extras.repo 

2 將mirrorlist注釋掉,緩存阿里的,gpgcheck換成0(暫不知道原因) 

CentOS-AppStream.repo:

baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=0

CentOS-BaseOS.repo:

baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=0

CentOS-Extras.repo:

baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
gpgcheck=0

 3 清空,重新緩存

[root@test-138 yum.repos.d]# yum clean all
0 files removed
[root@test-138 yum.repos.d]# yum makecache 
CentOS-8 - AppStream 

4 參考來源:

https://www.bilibili.com/video/BV1uZ4y1W7NT?from=search&seid=6799567751256323091
https://www.cnblogs.com/jet-chen/p/13041668.html

 


免責聲明!

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



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