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
相关推荐
求知若渴,虚心若愚。24 分钟前
高可用实战之Nginx + Apache篇
运维·nginx·apache
wanhengidc24 分钟前
企业在使用巨椰云手机进行多开挂机功能的优点有哪些?
运维·服务器·安全·智能手机
kuidun37 分钟前
Linux常见指令大全:从入门到精通
linux·运维·chrome·linux入门指令
哈基米喜欢哈哈哈2 小时前
进程和线程
java·linux·windows·笔记
扶风呀3 小时前
负载均衡详解
运维·后端·微服务·面试·负载均衡
chengpei1473 小时前
Ubuntu Server系统安装磁盘分区方案
linux·运维·ubuntu
轻松Ai享生活3 小时前
SysRq详解
linux
现实与幻想~4 小时前
Linux:企业级WEB应用服务器TOMCAT
linux·前端·tomcat
网硕互联的小客服4 小时前
服务器如何应对SYN Flood攻击?
运维·服务器·网络
ZERO的秃头之路5 小时前
WMware的安装以及Ubuntu22的安装
linux·服务器·ubuntu