Redhat默认的源不但速度不给力,而且软件版本陈旧,今天试着将Redhat默认源替换为CentOS的163源,发现速度能达到2M/s左右,而且版本都比较新,非常给力,与大家分享!
(目前可以使用CentOS0-6.3软件仓库的软件)
1. 删除原有的yum源
-
# rpm -aq | grep yum|xargs rpm -e --nodeps
2.下载新的yum安装包,这里使用centos-6.3
-
# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
-
# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
-
# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-3.2.29-30.el6.centos.noarch.rpm
-
# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
3.安装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-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
4. 更改yum源
在/etc/yum.repos.d/新建文件centos.repo,内容如下:
-
#########################################################################
-
# 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
-
-
#########################################################################
5.清理yum缓存
-
# yum clean all
-
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
-
# yum install software_name #测试新源是否可用
6.更新系统
(1)如果出现域名不能解析的情况,添加nameserver 8.8.8.8到/etc/resolv.conf中即可。
分享到:
相关推荐
亲自解决公司yum问题,特别研究编著.解决redhat在5.0及6.0的yum使用问题。
介绍如何在RHEL5没有subscription的情况下换用centos yum源
linux redhat centos修改yum下载源.zip
# 删除redhat自带的yum包 rpm -qa|grep yum|xargs rpm -e --nodeps # 安装yum软件包 # 注意:单个的安装包可能会依赖其它包(例如yum和yum-fastestmirror会相互依赖),所以我们可以把所有这些包放在一起,用一行...
内含需要安装的rpm包和修改后的yum源配置。 python-urlgrabber-3.9.1-11.el6.noarch.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.i686.rpm yum-metadata-parser-1.1.2-16.el6.x86_64...
这是最新的redhat5.1配置centos yum的教程,将redhat的收费yum替换成centos免费yum,里面的软件下载地址是最新的(2014-02-28),大家可以直接wget使用,如果提示不可用可能是格式问题,建议先复制到记事本然后在粘贴...
RedHat 5.3配置YUM 从centos5源与光盘源更新软件
该资料包提供了在redhat/centos 6版本上安装createrepo命令所需的rpm包,并提供安装说明文档,以及如何配置制作yum本地源的指导文档。
redhat7替换使用CentOS yum源--博客附件;方便下载,改为1积分,CSDN好像最低就是1积分! 大家别下了,我怕资源失效,文章写好久了
Redhat7 安装 yum 亲测 图解 这是安装全量包 包括 CentOS-Base.repo配置文件 亲测博客地址:http://blog.csdn.net/qq_34256348/article/details/78837175
Red Hat Enterprise Linux7的更新包只对注册的用户生效,所以需要自己手动改成Centos的更新包,Centos几乎和和Redhat是一样的,所以无需担心软件包的兼容问题。
redhat更改为centOS-6.4 yum源相关安装包
redhat7使用yum需要收费,不能直接使用,需要使用centos7的yum源,本人看了一些文档和博客总结成了这个方法,成功地为redhat7配置好了yum,这个压缩包中包含配置yum的方法以及用到的文件,需要提前安装python,我的linux安...
通用版redhat6或者centos6的yum源
redhat 6系列的自带的yum需要在官网注册付费才能使用,网上的换yum源教程里的资源下载路径都过期了,现在将这4个文件一起打包提供下载。
将redhat linux下收费yum源改为centos免费Yum源 有上网找的yum源软件包下载地址,直接就可以用
redhat7.9 + yum.repos.d +CentOS7-Base-163.repo + Centos-7-aliyun.repo
RedHat_5.3配置YUM_从centos5源与光盘源更新软件
linux redhat yum 上海交大的CentOS更新源