美文网首页
CentOS8 配置yum源和epel源

CentOS8 配置yum源和epel源

作者: 肉包君 | 来源:发表于2020-12-23 14:48 被阅读0次

2020.12.23

# 备份原始yum源
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mkdir bak
[root@localhost yum.repos.d]# mv CentOS* bak/
# 下载对应版本的repo文件
[root@localhost yum.repos.d]# wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo     (或写成 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo)
# 删除旧的yum缓存,开启新缓存
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum makecache
# 更新(时间紧迫的情况下这一步可略)
[root@localhost yum.repos.d]# yum update -y
# 配置epel源
[root@localhost yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
# 将epel配置中的地址换成阿里云的地址
[root@localhost yum.repos.d]# sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@localhost yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*

CentOS8 安装教程参考文章:https://www.cnblogs.com/zkwarrior/p/12697806.html(详细带图)
CentOS8 镜像下载地址:https://mirrors.aliyun.com/centos/8/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso

相关文章

网友评论

      本文标题:CentOS8 配置yum源和epel源

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