Linux(CentOS7)修改默认yum源为国内的阿里云、网易yum源
2024-10-16 22:18:16
修改方式:
echo 备份当前的yum源
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex
echo 新建空的yum源设置目录
mkdir /etc/yum.repos.d
echo 下载阿里云的yum源配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
然后重建缓存:
yum clean all
yum makecache
========================我是可爱的分割线========================
执行报错“-bash: wget: command not found”的解决方式
执行报错:
原来默认的centos最小版是没有安装wget的。我们需要先yum安装一下。
回滚配置
cp /etc/yum.repos.d.backup4comex/* /etc/yum.repos.d
然后yum安装wget
yum -y install wget
然后再次获取:
rm -rf /etc/yum.repos.d
mkdir /etc/yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
最新文章
- android socket 线程连接openwrt与arduino单片机串口双向通信
- IBatis分页显示
- ThinkPHP系的两个东东OneThink和ThinkCMF
- get_magic_quotes_gpc函数
- oracle nvl和nvl2的区别
- JadClipse eclipse反编译插件
- 设计模式------PROTOTYPE(原型),TEMPLATE(模板)
- Windows Server 2008安装 百度Wifi \ 360Wifi \ 小米Wifi 失败的解决方法
- 京东分布式缓存redis应用实战
- UOJ#266. 【清华集训2016】Alice和Bob又在玩游戏 博弈,DSU on Tree,Trie
- HBase实践案例:车联网监控系统
- 双重ScrollView,RecyclerView联动实例
- python unittest框架装饰器
- eclipse如何导入jar包 BUILD PATH
- 利用Python进行自然语言处理(笔记)第一章
- mac 下安装ES 与 Head插件 以及安装Kibana
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone问题解决
- SAS/SATA/SSD/IDE硬盘介绍区别
- js条件语句之职责链数组
- EF – 7.一对多关联