配置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

相关推荐
璞致电子2 小时前
fpga开发板ZYNQ 璞致 PZ7010/7020 邮票孔核心板简介-ZYNQ7000系列小系统学习板
linux·嵌入式硬件·学习·fpga开发·fpga·fpga开发板·xilinx开发板
第四维度42 小时前
【全志V821_FoxPi】9-2 Linux IIC驱动MPU6050
linux·传感器·tina·mpu6050·v821
mjx65303 小时前
PyTorch快速入门
linux
DeeplyMind4 小时前
AMD KFD的BO设计分析系列6-1: VRAM BO的显存分配分析
linux·驱动开发·amdgpu·rocm·kfd
我言秋日胜春朝★4 小时前
【Linux网络编程】多路转接reactor——ET模式的epoll
linux·服务器·网络
Hell_Yrz5 小时前
Golang信号处理实战
linux
四桑.5 小时前
uniapp运行微信小程序uni为什么是undefined
linux
用户31187945592186 小时前
perl-Test-Simple-1.302195-5.fc39.noarch.rpm 怎么安装?Fedora 39 安装步骤讲解
linux
焦思懿--19期--工职大6 小时前
VMWare和物理机之间文件传输
linux·服务器·网络·电脑
四桑.6 小时前
echarts6.0.0版本,平行坐标图形,series为多组时,横线溢出绘图区域,如何解决
linux