一般安装好redhat后,不能注册的话,不能使用系统自带的yum源。但是我们可以自己配置yum源来解决这一问题。下面介绍下redhat配置163yum源。

1. 检查是否安装yum包

rpm -qa |grep yum

2. 删除自带的yum包

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

因为一些包之间可能会有依赖关系,所以我们需要加上参数 --nodeps 无视依赖关系。

3. 下载yum包

Yum包下载地址http://mirrors.163.com/centos/

在这个网站里,你可以自己选择需要下载的文件,进入形如5/或者6/的文件下载,其他的无法下载。  (rpm 版本会更新)

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-73.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-37.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-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

5. 替换yum源

cd  /etc/yum.repos.d/

wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo

vi CentOS6-Base-163.repo

注意原来的yum源配置文件是rhel-source.repo。这里把CentOS6-Base-163.repo替换掉rhel-source.repo。

mv rhel-source.repo rhel-source.repo.bak
mv CentOS6-Base-163.repo rhel-source.repo

6. 编辑替换后的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配置163yum源完成

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

  1. redhat 7.2 配置yum源

    http://blog.csdn.net/wylfengyujiancheng/article/details/50418930

  2. RedHat 6配置yum源为网易镜像(转)

    概述 由于版权的问题,RedHat6不能直接使用yum一些指令,需要配置yum源为网易镜像,但是网上谈到很多:整理一下,将有用的信息整理如下,以便于能够为其他的配置服务配置使用:需要卸载掉原理系统自带 ...

  3. redhat 配置yum源(配置163 yum repo)

    一般安装好redhat后,不能注册的话,不能使用系统自带的yum源.但是我们可以自己配置yum源来解决这一问题.下面介绍下redhat配置163yum源. 1) 查看版本号和系统类别: cat /et ...

  4. linux配置yum源

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

  5. Linux 配置yum源.

    Linux 配置yum源. 环境:虚拟机中安装了RedHat ,在进行安装mariadb的时候,出现如下错误.是因为yum源的问题,需要进行配置yum源.本教程是配置本地yum源. [root@loc ...

  6. 配置Yum源repo文件及搭建本地Yum服务器

    分享一篇配置Yum源repo文件及搭建本地Yum服务器的方法,希望对大家有用. Yum源的话有三大类: Base Extra Epel Base:就是你下载的光盘镜像里面的DVD1Extra:就是你下 ...

  7. Redhat7配置yum源(本地源和网络源)

    Redhat7配置yum源(本地源和网络源)   目录 一:配置本地yum源 二:配置网络yum源 YUM(Yellow dog Updater Modified): yum是基于RPM包构建的软件更 ...

  8. 配置 yum 源的两种方法

    配置 yum 源的两种方法 由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装,再配置其他源,以下为详细过程:  1.删除red ...

  9. CentOS / RHEL 配置yum源

    CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...

随机推荐

  1. Duilib教程-非DUI控件

    DUILIB并不是真正的DUI,至少有部分控件不是完全DUI的.其实包括: 1.EDIT. 它的实现原理是,CEditUI包含一个窗口CEditWnd,流程如下: 1)鼠标单击,创建窗口见 EditU ...

  2. resolution will not be reattempted until the update interval of vas has elap

    转自:http://kia126.iteye.com/blog/1785120 maven在执行过程中抛错: 引用 ... was cached in the local repository, re ...

  3. 使用MAP文件快速定位程序崩溃代码行 (转)

    使用MAP文件快速定位程序崩溃代码行 =========================================================== 作者: lzmfeng(http://lz ...

  4. HTML中条件注释的高级应用

    在页面头部加入 <!--[if lt IE 9]><html class="ie"><![endif]--> 可简单CSS Hack,IE6.I ...

  5. ubuntu首次给root用户设置密码和root用户登录设置

    1 ubuntu首次给root用户设置密码 给root用户设置密码输入命令sudo passwd,然后系统会让你输入密码,这时输入的密码就是root用户的密码了,设置完成之后就可以切换root用户登录 ...

  6. 第08章—整合Spring Data JPA

    spring boot 系列学习记录:http://www.cnblogs.com/jinxiaohang/p/8111057.html 码云源码地址:https://gitee.com/jinxia ...

  7. 【转】spring和springMVC的面试问题总结

    1.Spring中AOP的应用场景.Aop原理.好处? 答:AOP--Aspect Oriented Programming面向切面编程:用来封装横切关注点,具体可以在下面的场景中使用: Authen ...

  8. 搜狐云景client工具评測之WordPress的搭建

    搜狐云景是搜狐推出的一款PaaS产品,眼下还处在公測阶段,拿到邀请码后试用了一下,感觉还不错. 搜狐云景提供了四种方式部署应用,感觉应该能够满足各种口味的码农:1. zip包的形式在网页上传并部署   ...

  9. C/C++运算符及其优先级

    1.自增自减 (1)前置运算:"先变后用"   如++i. 后置运算:"先用后变"   如i--. 比如: int i = 5. y1 = ++i: y2 = ...

  10. centos上源码安装clang 3.8

    之前想在centos系统上安装clang 3.6版本,由于yum上版本太低,想通过源码编译安装.按照网上说的源码安装步骤,下好llvm.clang.clang-tools-extra和compiler ...