配置RHEL和centOS的阿里云镜像源

备份

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

编辑 YUM 仓库配置文件

sudo vi /etc/yum.repos.d/CentOS-Base.repo

配置内容:

base

name=CentOS-7 - Base - Aliyun

baseurl=http://mirrors.aliyun.com/centos/7/os/ b a s e a r c h / g p g c h e c k = 1 g p g k e y = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s / 7 / o s / basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/7/os/ basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/7/os/basearch/RPM-GPG-KEY-CentOS-7

updates

name=CentOS-7 - Updates - Aliyun

baseurl=http://mirrors.aliyun.com/centos/7/updates/ b a s e a r c h / g p g c h e c k = 1 g p g k e y = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s / 7 / o s / basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/7/os/ basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos/7/os/basearch/RPM-GPG-KEY-CentOS-7

编辑 EPEL 仓库配置文件 epel.repo
sudo vi /etc/yum.repos.d/epel.repo

编辑内容:

epel

name=Extra Packages for Enterprise Linux 7 - b a s e a r c h − A l i y u n b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / e p e l / 7 / basearch - Aliyun baseurl=http://mirrors.aliyun.com/epel/7/ basearch−Aliyunbaseurl=http://mirrors.aliyun.com/epel/7/basearch

failovermethod=priority

enabled=1

gpgcheck=0

gpgkey=http://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7

清理缓存

sudo yum clean all

生成缓存(重新生成缓存,以验证配置是否正确)

sudo yum makecache

尝试安装软件:

sudo yum install tftp-server tftp

相关推荐
平行云PVT4 小时前
数字孪生信创云渲染技术解析:从混合信创到全国产化架构
linux·unity·云原生·ue5·图形渲染·webgl·gpu算力
xdscode5 小时前
Linux云服务器安装openclaw,并对接飞书通道
linux·服务器·飞书·openclaw
Percep_gan6 小时前
Linux中安装Redis,很详细
linux·运维·redis
2401_877274246 小时前
从匿名管道到 Master-Slave 进程池:Linux 进程间通信深度实践
linux·服务器·c++
feng_you_ying_li6 小时前
linux之用户的权限详解(4)
linux·运维·服务器
二进制person8 小时前
JavaEE初阶 --网络编程
linux·服务器·网络
Cyber4K8 小时前
【妙招系列】Harbor 镜像私有仓库搭建手册
linux·云原生·容器
Irissgwe8 小时前
进程间通信
linux·服务器·网络·c++·进程间通信
创世宇图9 小时前
阿里云Alibaba Cloud Linux 4 LTS 64位生产环境配置-Nginx
linux·nginx
待续30110 小时前
OpenClaw 安装及使用教程(Windows / macOS / Linux)
linux·windows·macos