修改方式:

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

最新文章

  1. android socket 线程连接openwrt与arduino单片机串口双向通信
  2. IBatis分页显示
  3. ThinkPHP系的两个东东OneThink和ThinkCMF
  4. get_magic_quotes_gpc函数
  5. oracle nvl和nvl2的区别
  6. JadClipse eclipse反编译插件
  7. 设计模式------PROTOTYPE(原型),TEMPLATE(模板)
  8. Windows Server 2008安装 百度Wifi \ 360Wifi \ 小米Wifi 失败的解决方法
  9. 京东分布式缓存redis应用实战
  10. UOJ#266. 【清华集训2016】Alice和Bob又在玩游戏 博弈,DSU on Tree,Trie
  11. HBase实践案例:车联网监控系统
  12. 双重ScrollView,RecyclerView联动实例
  13. python unittest框架装饰器
  14. eclipse如何导入jar包 BUILD PATH
  15. 利用Python进行自然语言处理(笔记)第一章
  16. mac 下安装ES 与 Head插件 以及安装Kibana
  17. The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone问题解决
  18. SAS/SATA/SSD/IDE硬盘介绍区别
  19. js条件语句之职责链数组
  20. EF – 7.一对多关联

热门文章

  1. 如何理解swift中的delegate
  2. Python爬虫常用小技巧之设置代理IP
  3. Scrapy爬虫day2——简单运行爬虫
  4. NOIP模拟 38
  5. 没NOIP了?
  6. python 类内部装饰器的实现 与 参数解构学习
  7. day7-format字符串格式化
  8. win7设置docker默认服务端地址
  9. Comparable接口的实现和使用
  10. 关于Jvm的见解(二)