1.检查是否安装yum包

rpm -qa |grep yum

2. 删除自带的yum包

rpm -qa|grep yum|xargs rpm -e --nodeps

3. 下载yum包

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm

4.解压yum包

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm

5.替换yum源

cd  /etc/yum.repos.d/

 

mv rhel-source.repo rhel-source.repo.bak

vi  rhel-source.repo

 

#rhel-source.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client.  You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

#

#

[base]

name=CentOS-6 - Base - 163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-6 - Updates - 163.com

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - 163.com

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

7. 清理并重建缓存 

yum clean all

yum makecache

8. 更新yum

yum update

 

  

redhat 6.8 配置外网yum源的更多相关文章

  1. linux里如何配置本地yum源和外网yum源

    一:本地和外网源配置方法 二:外网YUM源的地址 一: ① 本地源配置方法:以光盘里rpm举例(这里使用虚拟机演示) 1.挂载一个iso的镜像 把光盘挂载到一个目录里,然后进入/etc/yum.rep ...

  2. linux 配置内网yum源

    一.yum服务器端配置1.安装FTP软件#yum install vsftpd #service vsftpd start#chkconfig --add vsftpd#chkconfig vsftp ...

  3. redhat 6.8 配置centos6的yum源

    1. 检查是否安装yum包[root@node1 rpms]# rpm -qa|grep yum 2. 删除自带的yum包[root@node1 rpms]# rpm -qa|grep yum|xar ...

  4. 常用的外网yum源之epel.repo

    [epel]name=Extra Packages for Enterprise Linux 6 - $basearchbaseurl=http://download.fedoraproject.or ...

  5. 搭建内网Yum源

    搭建内网yum源 阅读(2,238) 一:因内网服务器 众多,当统一安装一些比较大的rpm的时候全部从外网下载就比较慢,而且还占用了一定的出口流量,因此在内网部署了一台yum服务器,将阿里云的epel ...

  6. #centos7 创建内网yum源 OpenStack源部署

    #centos7 创建内网yum源#centos7 自动化安装 本地 内网 web源创建.更新 createrepo http OpenStack源部署 Elven原创 http://www.cnbl ...

  7. centos7.4安装redis以及配置外网访问

    一.安装redis 第一步:下载redis安装包 wget http://download.redis.io/releases/redis-4.0.6.tar.gz [root@VM_34_108_c ...

  8. Centos 5.x/6.x 配置163网易yum源

    Centos系统默认都是系统自带的yum源,国内用户用yum源安装比较慢,为了提高效率,一般我们会配置国内的yum源.国内比较好的yum源有网易yum源.搜狐yum源等. 我感觉网易的yum源比较好用 ...

  9. 阿里云ECS搭建SVN配置外网

    阿里云ECS搭建SVN后,配置外网启动不了,检查云服务器没发现问题,后来发现是阿里云拦截,需要在阿里云控制台ECS安全组新增如下配置:

随机推荐

  1. Codeforces 512B: Fox And Jumping

    题目链接 题意说的是,有n种卡片,使用第i种卡片可以使当前自己在数轴上的位置移动 l[i],要获得使用第i种卡片的代价是 c[i],求能使自己移动到数轴上任意位置的最小代价,如果不可能则输出-1 当前 ...

  2. 【leetcode】1035. Uncrossed Lines

    题目如下: We write the integers of A and B (in the order they are given) on two separate horizontal line ...

  3. 29 基于PCL的点云平面分割拟合算法技术路线(针对有噪声的点云数据)

    0 引言 最近项目中用到了基于PCL开发的基于平面的点云和CAD模型的配准算法,点云平面提取采用的算法如下. 1 基于PCL的点云平面分割拟合算法 2 参数及其意义介绍 (1)点云下采样 1. 参数: ...

  4. ASP汉字转拼音函数的方法

    <% 'ASP汉字转拼音函数 Set d = CreateObject("Scripting.Dictionary") d.add "a",-20319 ...

  5. 修改Oracle数据库SGA和PGA大小

    SGA的大小:一般物理内存20%用作操作系统保留,其他80%用于数据库.SGA普通数据库可以分配40%-60%之间,PGA可以分配20%-40%之间.1.以dba身份登录并查看SGA信息:SQL> ...

  6. Arithmetic Sequence

    Arithmetic Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Othe ...

  7. vue路由vue-router的安装和使用

    1.安装,如果你没有在创建项目时候选择的情况下  cnpm install vue-router 2.使用    假设App为根组件,两个自定义组件home及list main.js里操作 impor ...

  8. 关于TCP\IP协议的简单理解

    一: HTTP是基于TCP协议的,TCP属于传输层.HTTP属于应用层. 另一个属于传输层的是UDP协议. 但HTTP是基于TCP这个协议,不是UDP这个协议. TCP相比于UDP,更安全,稳定.因为 ...

  9. Invoke和BeginInvoke的区别(转载)

    转自http://www.cnblogs.com/c2303191/articles/826571.html Control.Invoke 方法 (Delegate) :在拥有此控件的基础窗口句柄的线 ...

  10. RESTful再理解

    目录 目录 前言 RESTful的目的 REST的含义 表现层 状态转化 无状态协议HTTP 最后 前言 这是在经过一段时间的积累后,对RESTFul框架的再一次更深入的理解.希望能够将零散的知识点连 ...