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

相关推荐
huangyuchi.30 分钟前
【Linux】LInux下第一个程序:进度条
linux·运维·服务器·笔记·进度条·c/c++
weixin_4180076040 分钟前
MQTTX连接阿里云的物联网配置
物联网·阿里云·云计算
帽儿山的枪手1 小时前
程序员必掌握的iptables五表五链
linux·网络协议
西阳未落1 小时前
Linux(14)——库的制作与原理
linux
BOB-wangbaohai1 小时前
阿里云ACP云计算备考笔记 (4)——企业应用服务
阿里云·云计算·云监控·云解析·云cdn·sls日志服务
444A4E2 小时前
深入Linux进程优先级:Nice值与O(1)调度器原理
linux·操作系统
Jooolin2 小时前
【编程史】Git是如何诞生的?这可并非计划之中...
linux·git·ai编程
云边有个稻草人2 小时前
【Linux系统】第八节—进程概念(上)—冯诺依曼体系结构+操作系统+进程及进程状态+僵尸进程—详解!
linux·进程·冯诺依曼体系结构·pcb·僵尸进程·进程的状态·task_ struct
xian0gang2 小时前
rk3588 区分两个相同的usb相机
linux
这儿有一堆花2 小时前
安全访问家中 Linux 服务器的远程方案 —— 专为单用户场景设计
linux·服务器·安全