centos7修改yum源为阿里镜像
参考博客:
需要在root账号下操作
- 可能新的系统需要开启网络配置,操作如下
ip address
#查看网络连接设备
#可以看到两个设备:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
#那么,有线网就是叫enp1s0啦,(虚拟机一般为 ens33 )
// 打开有线网配置
vi /etc/sysconfig/network-scripts/ifcfg-enp1s0
// 最后一行,修改为YES
ONBOOT=YES
// 重启网络服务
systemctl restart network.service
- 备份系统镜像源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- 下载阿里镜像源,如果没有
wget,使用yum install wget安装
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 运行yum makecache生成缓存
yum makecache
- 然后更新
yum update
- 增加epal源
// 安装epel源
yum install epel-release
// 修改为阿里的epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
// 安装yum源优先级管理工具
yum install -y yum-priorities
// 添加优先级(数字越小优先级越高)
vim /etc/yum.repo.d/epel.repo
priority=88
// 添加优先级(这个数要小于epel里的88即可)
vim /etc/yum.repo.d/Centos-7.repo
priority=6
// 开启yum源优先级功能
vim /etc/yum/pluginconf.d/priorities.conf
// 确保文件内容包含如下:
[main]
enabled=1
<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">
centos7修改yum源为阿里镜像的更多相关文章
- [转]centos7 修改yum源为阿里源
centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 cd /etc/yum.repos.d 接着备份旧的配置文件 sudo mv CentOS-Base.repo ...
- centos7 修改yum源为阿里源
centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 安装base reop源 cd /etc/yum.repos.d 接着备份旧的配置文件 sudo mv Cen ...
- CentOS7 修改yum源为阿里云
1,登陆root帐号 2,cd /etc/yum.repo.d 3,mv CentOS-Base.repo CentOS-Base.repo.bak4,wget http://mirrors.aliy ...
- linux命令之修改yum源为国内镜像
命令: centos7 修改yum源为阿里源 首先是到yum源设置文件夹里 1. 查看yum源信息: yum repolist 2. 安装base reop源 cd /etc/yum.repos.d ...
- CentOs Linux 对于 修改 yum源 为 阿里
修改yum源为阿里 备份本地yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak 2.获取阿里 ...
- Centos-7修改yum源(阿里yum源)
国外地址yum源下载慢,下到一半就断了,就这个原因就修改它为国内yum源地址 国内yum源: 阿里centos7 yum源:http://mirrors.aliyun.com/repo/Centos- ...
- CentOS修改yum源为阿里云
yum的工具,自动去下载某个yum仓库的 rpm软件包,并且自动搜索软件下载软件依赖,如同pip3,npm等包管理工具 yum载linux中的 yum仓库是 /etc/yum.repos.d 并且在这 ...
- 修改yum源为阿里云的
将Centos的yum源更换为国内的阿里云源 author:headsen chen date:2018-04-28 13:33:41 1.备份 mv /etc/yum.repos.d/CentO ...
- CentOS7更换yum源为阿里云镜像源
1. 备份原来的yum源 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2.设置aliyun的y ...
随机推荐
- XOR Clique(按位异或)
XOR Clique(按位异或): 传送门:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4057 准备:异或:参加运算的两 ...
- 模板 - 数学 - 同余 - 扩展Euclid算法
普通的扩展欧几里得算法,通过了洛谷的扩展欧几里得算法找乘法逆元.修复了容易溢出的bug,虽然新版本仍有可能会溢出longlong,假如参与运算的数字都是longlong,假如可以的话直接使用__int ...
- RabbitMQ面试问答(子文章)(持续更新)
-----> 总文章 入口 文章目录 [-----> 总文章 入口](https://blog.csdn.net/qq_37214567/article/details/90174445) ...
- 在mybtis的映射文件中判断集合大小
<if test="groupIds != null and groupIds.size>0"> and (group_id in<foreach coll ...
- hyper-v启动虚拟机时提示“The application encountered an error while attempting to change the state of the machine ‘虚拟机名称'”如何处理?
1. 找出发生这一问题的事件代号 1.1 在开始菜单中搜索程序Event Viewer并点击进入 1.2 点击路径如下: “Applications and Services Logs > Mi ...
- nginx的代理配置
date: 2019-07-19 16:52:18 author: headsen chen proxy_pass http://aaa /; 如果在proxy_pass末尾的url加/,表示绝对 ...
- Android studio 运行打包 Ionic 项目
1.创建项目 ionic start myapp tabs 2.cd 到项目文件夹中 3.ionic cordova platfrom add android 执行这个命令后建议修改一下应用包名称,参 ...
- libfacedetection 人臉識別
计算相似度,然后比对 QVector<cv::Point> vec_point1 = facedetect_frontal_surveillance4(face_img.clone()); ...
- 深入学习c++--多线程编程(一)
1. 简介 2. 线程使用 2.1 demo #include <iostream> #include <thread> #include <future> usi ...
- 【Spring】基于@Aspect的AOP配置
Spring AOP面向切面编程,可以用来配置事务.做日志.权限验证.在用户请求时做一些处理等等.用@Aspect做一个切面,就可以直接实现. · 本例演示一个基于@Aspect的小demo 1. ...