1) 到http://mirrors.163.com centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d

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

  注意yum只会处理后缀是.repo的文件

2) 编辑CentOS6-Base-163.repo文件,将其中的$releasever更改为centos的版本号

  后面有更改好的, 如果安转软件时出错, 可以将gpgcheck=1修改成gpgcheck=0.

转载: http://blog.sina.com.cn/s/blog_50f908410101cto6.html

1、首先到http://mirrors.163.com/centos下载软件包

x86 地址:http://mirrors.163.com/centos/6/os/i386/Packages/

x86_64 地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/

必要下载的软件包有(以64位系统为例):

a  python-iniparse-0.3.1-2.1.el6.noarch.rpm

b  yum-3.2.29-40.el6.centos.noarch.rpm

c  yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

d  yum-plugin-fastestmirror-1.1.30-14.el6.noarch.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-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

[注] :版本不一定要最新的

2、卸载RedHat自带的yum

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

注:a、xargs是一条Unix和类Unix操作系统的常用命令。它的作用是将参数列表转换成小块分段传递给其他命令,以避免参数列表过长的问题

b、--nodeps  强制卸载,不管依赖性

3、安装下载的centosyum包:

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

[注] :最后2个需要一起安装,否则会出现依赖性错误

4、到http://mirrors.163.com centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d

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

5、编辑CentOS6-Base-163.repo文件,将其中的$releasever更改为centos的版本号

下面是修改好的:

# CentOS-Base.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

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-6 - Plus - 163.com

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

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

gpgcheck=1

enabled=0

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

#contrib - packages by Centos Users

[contrib]

name=CentOS-6 - Contrib - 163.com

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

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

gpgcheck=1

enabled=0

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

6yum clean all 清除原有缓存

7yum makecache  获取yum列表

出现下面提示,表示yum更改完成:

Metadata Cache Created

redhat6.4 install 163 source的更多相关文章

  1. linux下从源代码安装git的问题(install from source)

    安装环境:centos7.2 安装依赖包: yum install -y gcc .el7..x86_64 openssl-devel.x86_64 yum install -y curl.x86_6 ...

  2. org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=egmasDS

    17:34:37,235 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 17:34:37,281 INFO [ ...

  3. install 命令用法详解

    install 命令用法详解 http://man.linuxde.net/install install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户.install命令和cp命令类似 ...

  4. implement Google's Open Source Slam "Cartographer" demos in ROS/rviz

    Cartographer is a backpack equipped with Simultaneous Localization and Mapping (SLAM) technology. 1. ...

  5. Ruby on Rails Session 2: How to install Aptana Studio 3 on Ubuntu 12.04 LTS

    Update: An updated version of these instructions for Ubuntu 12.10 (Quantal Quetzal) is available her ...

  6. How To Install Apache Kafka on Ubuntu 14.04

    打算学习kafka ,接触一些新的知识.加油!!! 参考:https://www.digitalocean.com/community/tutorials/how-to-install-apache- ...

  7. linux 命令(alias , unalias , install ,ar , arch ,uname )

    https://linux.die.net/man/ http://man.linuxde.net/ user commands 1.alias [ˈālēəs]:别名 alias --help al ...

  8. ubuntu16.04 install qtcreator

    1. 安装相关软件,搭建环境 sudo apt install qt-creator sudo apt install qt5-default source python35/bin/activate ...

  9. Linux 中的 Install命令

    Linux 中的 Install命令 更新时间:2017年09月25日 16:51:45   投稿:mrr   我要评论 install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户. ...

随机推荐

  1. 洛谷 P3224 [HNOI2012]永无乡 解题报告

    P3224 [HNOI2012]永无乡 题目描述 永无乡包含 \(n\) 座岛,编号从 \(1\) 到 \(n\) ,每座岛都有自己的独一无二的重要度,按照重要度可以将这 \(n\) 座岛排名,名次用 ...

  2. 在HTML网页上打印需要的内容

    首先在head里面加入下面一段js代码: function preview(oper) { if (oper < 10) { bdhtml = window.document.body.inne ...

  3. HDU3605:Marriage Match IV

    Marriage Match IV Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...

  4. 【bzoj3211】花神游历各国&&【bzoj3038】上帝造题的七分钟2

    bzoj3038]上帝造题的七分钟2 Description XLk觉得<上帝造题的七分钟>不太过瘾,于是有了第二部. “第一分钟,X说,要有数列,于是便给定了一个正整数数列. 第二分钟, ...

  5. Activator.CreateInstance;Delegate.CreateDelegate

    原文发布时间为:2011-10-11 -- 来源于本人的百度文章 [由搬家工具导入] Activator.CreateInstance:http://msdn.microsoft.com/en-us/ ...

  6. Java并发笔记(一)

    1. lock (todo) 2. 写时复制容器 CopyOnWrite容器即写时复制的容器.通俗的理解是当我们往一个容器添加元素的时候,不直接往当前容器添加,而是先将当前容器进行Copy,复制出一个 ...

  7. Demystifying iOS Application Crash Logs

    http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs This is a blog post by So ...

  8. Android 显示或隐藏标题栏进度条TitleProgressBar

    1.新建项目,布局文件如下:activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/ ...

  9. Spring Cloud底层原理(转载 石杉的架构笔记)

    拜托!面试请不要再问我Spring Cloud底层原理 原创: 中华石杉 石杉的架构笔记   目录 一.业务场景介绍 二.Spring Cloud核心组件:Eureka 三.Spring Cloud核 ...

  10. csu1808

    csu1808 题意 n 个点间有 m 条地铁,每条地铁可能属于不同的线路,每条地铁有权值即通过时花费的时间,如果乘坐第 i 条地铁来到地铁站 s,再乘坐第 j 条地铁离开,需要花费额外的时间 \(| ...