Chinaunix首页 | 论坛 | 博客
  • 博客访问: 54170
  • 博文数量: 15
  • 博客积分: 481
  • 博客等级: 下士
  • 技术积分: 195
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-08 22:29
文章分类

全部博文(15)

文章存档

2013年(5)

2012年(1)

2009年(4)

2008年(5)

分类: LINUX

2008-10-15 10:55:37

一个速度还算可以的centos源站点。
另外,使用yum update时总有些包是你不想自动更新的,这个时候可以在yum.conf文件中设置
exclude=something  其中something支持通配符,比如*,?

[base]
name=CentOS-5.0 - Base
baseurl=5.0/os/$basearch/
gpgcheck=1
gpgkey=

#released updates
[update]
name=CentOS-5.0 - Updates
baseurl=5.0/updates/$basearch/
gpgcheck=1
gpgkey=

#packages used/produced in the build but not released
[addons]
name=CentOS-5.0 - Addons
baseurl=5.0/addons/$basearch/
gpgcheck=1
gpgkey=
#additional packages that may be useful
[extras]
name=CentOS-5.0 - Extras
baseurl=5.0/extras/$basearch/
gpgcheck=1
gpgkey=

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.0 - Plus
baseurl=5.0/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-5.0 - Contrib
baseurl=5.0/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=

#packages in testing
[testing]
name=CentOS-5.0 - Testing
baseurl=5.0/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=

rhel5(as5)里默认也装有yum,但是那个yum是要有授权才能使用,上哪去找这个授权尚未知晓。
这里用centos的yum来替换redhat的yum更新源程序。

下载centos5.6 yum源安装包
cd /tmp
wget
wget
wget
wget
wget
或者用中科大镜像

下载配置
cd /etc/yum.repos.d/
rm -rf rhel-debuginfo.repo

echo ‘[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever – $basearch – Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-debuginfo-beta]
name=Red Hat Enterprise Linux $releasever Beta – $basearch – Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[base]
name=Red Hat Enterprise Linux $releasever -Base
baseurl=
gpgcheck=1
gpgkey=
[update]
name=Red Hat Enterprise Linux $releasever -Updates
baseurl=
gpgcheck=1
gpgkey=
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
baseurl=
gpgcheck=1
gpgkey=
[addons]
name=Red Hat Enterprise Linux $releasever -Addons
baseurl=
gpgcheck=1
gpgkey=
‘ > rhel-debuginfo.repo

下载并导入KEY
cd /etc/pki/rpm-gpg/
wget
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*

先删掉reahat5.6自带的yum
rpm -qa|grep yum
rpm -e --nodeps `rpm -qa |grep yum-*`

安装centos5.6 yum源安装包
cd /tmp
rpm -ivh yum-*

yum update
yum clean all

当然想不更新某些包可以在/etc/yum.conf中[main]段添加include=php*.....

阅读(761) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:mplayer安装

给主人留下些什么吧!~~