当前位置:首页 > CentOS > 正文内容

CentOS8如何更换yum源

andy6个月前 (03-26)CentOS189

备份yum源配置

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

下载阿里云yum源到指定配置文件

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

替换yum源配置文件中相关配置项

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

清除yum源缓存并重新make缓存

yum clean all
yum makecache


扫描二维码推送至手机访问。

版权声明:本文由电脑帮发布,如需转载请注明出处。

本文链接:http://www.52dnb.com/?id=4

分享给朋友:

“CentOS8如何更换yum源” 的相关文章

CentOS 7-aarch64如何更换yum源

一、进入yum.repo.d[root@linux ~]# cd /etc/yum.repos.d/ [root@linux yum.repos.d]#二、备份原yum源[root@linux yum.repos.d]# mkdir&...

centos7安装gnome桌面

yum groupinstall "GNOME Desktop"systemctl set-default graphical.target...

CentOS8安装MySQL

1、下载MySQL Yum仓库配置包https://dev.mysql.com/downloads/repo/yum/ 2、安装MySQL Yum仓库sudo rpm -Uvh mysql80-community-release-el8-1.noarch.rpm3、安装...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。