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