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 分钟前
JMeter接口自动化脚本框架
运维·jmeter·自动化
Johny_Zhao25 分钟前
Burp Suite 企业级深度实战教程
linux·网络·网络安全·信息安全·云计算·shell·burp suite·系统运维·itsm
东临碣石8232 分钟前
【AI论文】论文转海报:迈向从科学论文到多模态海报的自动化生成
运维·人工智能·自动化
良辰美景好时光1 小时前
keepalived定制日志bug
linux·运维·bug
s_little_monster1 小时前
【Linux】网络--网络层--IP协议
linux·运维·网络·经验分享·笔记·学习·tcp/ip
forward_huan1 小时前
wsl安装linux
linux·wsl
西阳未落1 小时前
Linux(10)——第二个小程序(自制shell)
linux·运维·服务器
chiou7222 小时前
为 Ubuntu 安装的软件创建桌面图标
linux·ubuntu·lua
binary思维2 小时前
Ubuntu挂起和休眠
linux·运维·ubuntu
初叶 crmeb2 小时前
JAVA单商户易联云小票打印替换模板
java·linux·python