美文网首页
centos 8.4 修改源

centos 8.4 修改源

作者: 雨田君的记事本 | 来源:发表于2022-01-19 14:34 被阅读0次

1. 备份系统源

cd /etc/yum.repos.d/ && mkdir backup && mv *repo backup/

2. 下载源

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

sed -i -e "s|mirrors.cloud.aliyuncs.com|mirrors.aliyun.com|g" /etc/yum.repos.d/CentOS-*
sed -i -e "s|releasever|releasever-stream|g" /etc/yum.repos.d/CentOS-*

3. 重建缓存

yum clean all && yum makecache
# 安装htop
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install htop

相关文章

网友评论

      本文标题:centos 8.4 修改源

      本文链接:https://www.haomeiwen.com/subject/vkviqrtx.html