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
相关推荐
Tee xm1 小时前
清晰易懂的跨平台 MySQL 安装与配置教程
linux·windows·mysql·macos·安装
GalaxyPokemon1 小时前
MySQL基础 [一] - Ubuntu版本安装
linux·运维·ubuntu
musk12121 小时前
wsl2 配置ubuntu 固定ip
linux·tcp/ip·ubuntu
柳鲲鹏1 小时前
UBUNTU编译datalink
linux·运维·ubuntu
追随远方1 小时前
Ubuntu 64-bit 交叉编译 FFmpeg(高级用户指南)
linux·ubuntu·ffmpeg
GalaxyPokemon1 小时前
Muduo网络库实现 [七] - Connection模块
linux·服务器·网络
三阶码叟2 小时前
centos7 yum install docker 安装错误
运维·docker·容器
CaliXz2 小时前
野草云防火墙风险分析及 Docker 使用注意事项
运维·docker·容器
计算机学无涯2 小时前
Docker 命令简写配置
运维·docker·容器
the_nov3 小时前
19.TCP相关实验
linux·服务器·网络·c++·tcp/ip