分类: LINUX
2008-10-15 10:55:37
[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=
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*.....