CentOS AppStream 8 手动更新 yum源

由于CentOS 8的官方支持已在2021年12月31日结束,官方镜像中的CentOS 8包已被移除。因此,如果您仍然需要运行CentOS 8并更新其yum源,您可以考虑使用以下步骤来配置一个可用的yum源,例如阿里云的镜像源。

https://mirrors.aliyun.com/centos/8-stream/?spm=a2c6h.25603864.0.0.132666edLGinrb

1.备份现有的yum源配置文件:

cd /etc/yum.repos.d/

mkdir backup

mv *.repo backup/

2.编辑yum源配置文件:

a.手动创建CentOS-AppStream.repo

vim CentOS-AppStream.repo

i

appstream

name=CentOS-8-stream - AppStream

baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/

gpgcheck=1 enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

保存退出;

b.手动创建CentOS-BaseOS.repo

vim CentOS-BaseOS.repo

i

baseos

name=CentOS-8-stream - BaseOS

baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/

gpgcheck=1 enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

保存退出;

c.手动创建CentOS-Devel.repo

vim CentOS-Devel.repo

i

baseos

name=CentOS-8-stream - Devel

baseurl=https://mirrors.aliyun.com/centos/8-stream/Devel/$basearch/os/

gpgcheck=1 enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

保存退出;

d.手动创建CentOS-Extras.repo

vim CentOS-Extras.repo

i

baseos

name=CentOS-8-stream - Extras

baseurl=https://mirrors.aliyun.com/centos/8-stream/Extras/$basearch/os/

gpgcheck=1 enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

保存退出;

4.清空并重建yum缓存:

yum clean all

yum makecache

5.更新软件包:

yum update

相关推荐
小义_3 分钟前
【Linux 1】
linux·运维·云原生·红帽
JF_Ma4 分钟前
天量极客自动化技术:miniQMT系统实现量化交易自动化
运维·自动化
开开心心就好6 分钟前
无弹窗不更新的PC本地播放工具
运维·科技·macos·docker·计算机外设·ocr·powerpoint
面向对象World7 分钟前
Z8350 Broadcom SDIO网卡调试Ubuntu 22.04 Server版
linux·运维·ubuntu
Irissgwe12 分钟前
12、多路转接 select
linux·io多路转接·select
我命由我1234516 分钟前
工程中安全帽颜色含义
运维·经验分享·学习·职场和发展·求职招聘·职场发展·学习方法
ZFSS24 分钟前
BYOK(自带密钥)使用指南
运维·服务器·前端·人工智能·midjourney
无足鸟ICT26 分钟前
【RHCA+】编辑多个文件
linux
fengyehongWorld41 分钟前
Linux fd命令
linux
AIMath~42 分钟前
hermes agent安装在Linux centos中
linux·运维·服务器