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

相关推荐
4t4run4 分钟前
28、Linux 系统定时任务
linux·运维·服务器
~黄夫人~15 分钟前
Ansible 自动化运维:从 “手动输密码” 到 “一键免密管理”
linux·运维·自动化·ansible
cui__OaO20 分钟前
Linux驱动--基于驱动设备分离的按键中断驱动
linux·运维·服务器·嵌入式
星期五不见面1 小时前
虚拟机使用外部WPN网络
linux
OnlyEasyCode1 小时前
Linux下载Navicat、特定版本Mysql
linux·运维·服务器
宇宙帅猴1 小时前
【Ubuntu踩坑及解决方案(一)】
linux·运维·ubuntu·go
顾北121 小时前
阿里百炼AI大模型接入指南
阿里云·ai编程
济6171 小时前
linux 系统移植(第七期)----U-Boot 图形化配置及其原理-- Ubuntu20.04
linux·运维·服务器
_Xiaosz2 小时前
Photo-SLAM / ORB-SLAM3 编译报错解决:undefined reference to DUtils::Random
linux·ubuntu
kida_yuan2 小时前
【Linux】文件系统与 fsck.ext4 修复 - 我踩过的坑与总结
linux·运维·网络