vm的centos本地配置yum

vm的centos本地配置yum

关于上篇文章vmware安装centos7总结

出现关于配置yum源wget找不到命令,但是没安装yum就没法下载wget,也就没法使用wget

所以我们本地配置yum源,不用wget那个命令了

📕步骤:

java 复制代码
cd /etc/yum.repos.d
touch local.repo
vi local.repo 

然后把下面复制进去local.repo里

java 复制代码
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

然后

java 复制代码
yum makecache
yum clean all
yum repolist all
相关推荐
淼淼爱喝水36 分钟前
openEuler 下 Ansible 基础命令详解与实操演示2
linux·运维·windows
拾贰_C41 分钟前
【Ubuntu | install | 安装软件】 Ubuntu软件安装多种方式以及卸载
linux·运维·ubuntu
梦想的旅途21 小时前
效率革命:实现外部群聊信息的自动化同步方案
运维·自动化
·醉挽清风·1 小时前
学习笔记—Linux—信号阻塞&信号捕捉
linux·笔记·学习
杨云龙UP1 小时前
Linux生产环境下Oracle RMAN 备份、核查、清理与验证常用命令整理_20260330
linux·运维·服务器·数据库·oracle
网硕互联的小客服2 小时前
CentOS系统如何卸载桌面并以shell 字符界面启动?
运维·服务器·网络·安全
A.A呐2 小时前
【Linux第二十二章】https
linux·https
齐齐大魔王3 小时前
linux-线程编程
java·linux·服务器
舒一笑3 小时前
为什么 MinIO 生产部署“默认就是 4 台起步”?
运维
吕司3 小时前
Linux动静态库
linux·运维·服务器