全部博文(1015)
分类:
2012-12-20 15:19:30
原文地址:redhat5.4更改免费yum源 作者:purcotton
二、下载yum组件 yum.rar
rpm包已经有了,自己下载解压(有人会问为什么不用源代码安装,那么你吃个鹌鹑蛋还要刀叉吗)
三、下面将要安装着四个软件包,切记按照我的安装顺序来,否则会出现报错,切记~
四、下面下载yum的配置文件,点击下载 CentOS-Base.rar
上面的包是为redhat5.4准备的,如果你用不了的话,就把下面的代码写到CentOS-Base.repo中 保存在
/etc/yum.repos.d/
# CentOS-Base.repo
# # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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-$releasever - Base
baseurl=
gpgcheck=1
gpgkey=
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=
gpgcheck=1
gpgkey=
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=
gpgcheck=1
gpgkey=
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=
gpgcheck=1
gpgkey=
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=
gpgcheck=1 enabled=0
gpgkey=
把这个文件放在 /etc/yum.repos.d/
大功告成,yum已经更新为不用花钱的啦
注:如何觉着下载这么多不方便,可以下下载 yum.rar 这个包,放在/tools/下面 然后执行“sh /tools/yum/yum_stat.sh" 即可