redhat 7.9配置阿里云yum源

1、mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/

2、添加dns

vim/etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

nameserver 114.114.114.114

#配置完先检查下通不通

3、vi /etc/yum/pluginconf.d/subscription-manager.conf

将 "enabled=1" 改为 "enabled=0"

4、mv /etc/yum.repos.d/*.repo mv /etc/yum.repos.d/*.repo.bak

5、wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

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

6、sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo

#使用vim,里面的$releasever换成对应的版本

:%s/$releasever/7/g

7、yum clean all

8、yum makecache

相关推荐
Johny_Zhao3 天前
OpenClaw中级到高级教程
linux·人工智能·信息安全·kubernetes·云计算·yum源·系统运维·openclaw
Johny_Zhao5 天前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
Johny_Zhao7 天前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
NineData8 天前
数据库迁移总踩坑?用 NineData 迁移评估,提前识别所有兼容性风险
数据库·程序员·云计算
SaaS_Product13 天前
从实用性与体验角度出发,OneDrive有什么替代品
云计算·saas·onedrive
小扎仙森13 天前
关于阿里云实时语音翻译-Gummy推送WebSocket
websocket·阿里云·云计算
晚秋大魔王13 天前
ubutnu 服务器配置openclaw 使用阿里云百炼模型
运维·服务器·阿里云
Shacoray13 天前
OpenClaw 接入阿里云百炼 Coding Plan 指南
阿里云·ai·云计算·qwen3·openclaw·coding plan
TG_yunshuguoji13 天前
阿里云代理商:2026 年阿里云国际站上云接入指南
服务器·阿里云·云计算
阿里云云原生13 天前
阿里云可观测 2026 年 1 月产品动态
阿里云·云计算