Centos安装好之后,按照网上教程对yum源进行修改,但更新之后发现总是提示更新失败,到163网站上查找资源发现目前大部分网上的教程都写错地址了,呵呵

下面是正确的办法,请参考

1、进入存放源配置的文件夹
cd /etc/yum.repos.d

2、备份默认源
mv ./CentOS-Base.repo ./CentOS-Base.repo.bak

3、使用wget下载163的源 http://mirrors.163.com/.help/centos.html
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

4、把下载下来的文件CentOS-Base-163.repo设置为默认源
mv CentOS6-Base-163.repo CentOS-Base.repo

通过上述操作就把默认源修改为163的了。当然上述的第三、四步可以合并为如下:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O CentOS-Base.repo

运行yum makecache生成缓存
yum makecache

Centos系统更改yum源为163的更多相关文章

  1. CentOS 7更改yum源与更新系统

    在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.rep ...

  2. CentOS下更改yum源

    centos下下载工具为yum,对应的源在/etc/yum.repos.d/CentOS-Base.repo文件下,修改其URI中前面的网络地址即可

  3. 在CentOS 7下更改yum源与更新系统

    在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.rep ...

  4. centos 7更新yum源与更新系统

    1.备份/etc/yum.repos.d/下的原有文件(假如你想保留原系统的yum源的话),举例 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos ...

  5. 什么是yum源,如何更改yum源

    Yum(全称为 Yellow dog Updater, Modified) yum是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定的服务器 ...

  6. CentOS下安装yum源的流程和操作

    一般公司都用Linux来搭建服务器,Linux安装软件时能够用yum安装依赖包是一件非常简单而幸福的事情,因为你只需一个简单的安装命令yum install []即可安装相应的软件,yum工具会自动的 ...

  7. RedHat Enterprise Linux 6.4使用Centos 6的yum源问题

    RedHat Enterprise Linux 6.4使用Centos 6的yum源问题 作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install ...

  8. CentOS配置本地yum源/阿里云yum源/163yuan源,并配置yum源的优先级

    一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者 ...

  9. centOS下更新yum源

    CentOS下更新yum源 1.使用如下命令,备份/etc/yum.repos.d/CentOS-Base.repo. cp /etc/yum.repos.d/CentOS-Base.repo /et ...

随机推荐

  1. js-template-art【一】简述

    一.官方地址 地址:https://github.com/aui/art-template 二.概述 官方对比 三.特性 拥有接近 JavaScript 渲染极限的的性能 调试友好:语法.运行时错误日 ...

  2. 【Cocos2dx 3.x Lua】TileMap使用

    1.编辑TileMap地图资源 2.Cocos2dx 3.x Lua中使用TileMap   Link: http://codepad.org/P0nFP1Dx  local TileMap=clas ...

  3. docker——libnetwork插件网络功能

    从1.7.0版本开始,Docker正是把网络和存储这两部分的功能都以插件化形式剥离出来,允许用户通过指令来选择不同的后端实现.剥离出来的独立容器网络项目叫libnetwork,从名字就能看出,它希望将 ...

  4. com.sun.image.codec.jpeg在Eclipse中报错的解决办法

    在Eclipse中处理图片,需要引入两个包:import com.sun.image.codec.jpeg.JPEGCodec;import com.sun.image.codec.jpeg.JPEG ...

  5. html 音频

    <!DOCTYPE html><meta charset="utf-8"><video src="movie.webm" cont ...

  6. Ubuntu 系统下暴力卸载 MySQL

    一.概述 MySQL 出问题了,正常的 start.stop 不起作用. apt-get remove mysql-server apt-get remove mysql-client 上面这些命令不 ...

  7. 2017-2018 ACM-ICPC German Collegiate Programming Contest (GCPC 2017) Solution

    A. Drawing Borders Unsolved. B. Buildings Unsolved. C. Joyride Upsolved. 题意: 在游乐园中,有n个游玩设施,有些设施之间有道路 ...

  8. echarts 不同区域背景色不同 废了我一天的时间

    var result = echarts.init(document.getElementById('result')); var option1 = { title: { text: '设备阶段故障 ...

  9. Centos75 firewalld防火墙

    Centos75 防火墙iptables被firewalld取代 #启动firewalld systemctl start firewalld #查看firewalld systemctl statu ...

  10. Python3.x:os.mkdir与 os.makedirs(创建目录方法)区别

    Python3.x:os.mkdir与 os.makedirs区别 1,os.mkdir mkdir( path [,mode] ) 说明: 创建一个目录,可以是相对或者绝对路径,mode的默认模式是 ...