当前位置:网站首页>yum源修改
yum源修改
2022-08-07 00:14:00 【wwanglimeii】
两种yum源
本地yum。安装速度快,无网络的情况也可以用yum,但是有的包本地yum源没有
国内yum。centos的yum源是国外的,速度慢;国内的yum源速度快
参考:
链接: https://www.bilibili.com/video/BV18S4y1B7oe?spm_id_from=333.337.search-card.all.click&vd_source=95330cb8cb7209dee3b7be447f187155
一、本地源
1.备份
cd /etc/yum.repos.d
mkdir bac
mv *.repo bac
cp CentOS-Media.repo ../
修改CentOS-Media.repo的内容,如下图

2.挂载
插入光盘如上图
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
#检查是否安装成功
yum repolist

yum可用

二、国内源
浏览器中输入网址:http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all
yum makecache
报错
1.yum安装报错,网络不可达—网络配置有误
解决:
IPADDR=192.168.80.144
NETMASK=255.255.255.0
GATEWAY=192.168.80.2
DNS1=192.168.80.2
ping www.baidu.com验证是否正确

边栏推荐
- Vi learning (2) the common commands include move cursor/highlight the text/undo and the undo/delete/copy and paste the text/find replacement/insert 】
- 【每日一题】1408. 数组中的字符串匹配
- Flutter APNS device token not set before retrieving FCM Token for Sender ID
- 用同花顺开户安全么
- Hand torn Android Framework bottom-level interview questions collection
- openharmony萌新贡献指南
- Uuid 32-bit data processing, 16
- Playwright安装加一个简单的实例
- Those MP3s that are reluctant to delete--modify the ID3tag of mp3 in batches
- Record the days we went through together
猜你喜欢
随机推荐
2022.8.4 Mock Competition
TypeError: list indices must be integers or slices, not float
[7] Advanced C language -- program compilation (preprocessing operation) + linking
超分辨率模型小抄(1)
[Redis] Redis Learning - Three Special Data Types
How is the Service started?tell you
strcmp、strstr、memcpy、memmove等库函数的用法和模拟实现
【Day_13 0509】参数解析
Vi learning (3) the split screen command 】 to be perfect
linux-mysql备份
A Preliminary Study of Web Development: The Box Model of Web Page Layout
在 C# 中如何检查参数是否为 null
vi学习(2)【常用命令包括移动光标/选中文本/撤销和反撤销/删除文本/复制粘贴/查找替换/插入】
中国银河证券开户安全吗
php 三维数组根据某个键合并并累加他们的值
公共关系与人际交往能力
蒸馏学习框架小抄(1)
长安欧尚z6idd的智能性如何?采用了整套主被动安全保护措施
深入了解集合的使用方法
Public Relations Exam Questions and Reference Answers







![[7] Advanced C language -- program compilation (preprocessing operation) + linking](/img/bf/fc81f3dc354e78712be9a6064a929f.png)

