CentOS8配置阿里云yum源

你离开我真会死。 提交于 2020-03-10 07:21:10

1、进入到yum源相应的目录
cd /etc/yum.repos.d/
2、创建备份目录,把相应的文件进行备份
mkdir bak
mv * bak/
3、编辑配置CentOS-Base.repo文件

[root@localhost yum.repos.d]# cat CentOS-Base.repo 
# file: /etc/yum.repos.d/CentOS-AppStream.repo
[aliyun-AppStream]
name=CentOS-$releasever - AppStream
baseurl=http://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# file: /etc/yum.repos.d/CentOS-Base.repo
[aliyun-BaseOS]
name=CentOS-$releasever - Base
baseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[aliyun-extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos/8.0.1905/extras/x86_64/os/
enabled=1
gpgcheck=1

4、安装epel-release源
dnf -y install epel-release
5、清yum缓存,重新加载

dnf clear all
dnf makecache
dnf repolist
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!