星期二, 七月 10, 2007

RHEL4 yum 安装配置

利用CentOS 的yum库升级RHEL AS4
1.下载并安装yum-2.4.0-1.centos4.noarch.rpm文件,下载地址为:
http://rpm.pbone.net/index.php3里面搜索

yum有问题:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

/usr/lib/python2.3/site-packages/cElementTree.so: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

cElementTree.so cannot open shared !!!
所以我们找另一个具有cElementTree.so的文件,在http://rpmfind.net/linux/rpm2html/search.php?query=cElementTree.so
中发现这个
smart-0.50-45.el4.at.x86_64.rpm也具有cElementTree.so文件.
把这个装上后,果然可以yum了!

2.修改或建立/etc/yum.repos.d/CentOS-Base.repo为如下内容:


清华大学的centos源
[base]
name=CentOS-$releasever - Base
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/4.5/os/$basearch/
gpgcheck=1

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/4.5/updates/$basearch/
gpgcheck=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/4.5/addons/$basearch/
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/4.5/extras/$basearch/
gpgcheck=1

3.修改或建立/etc/yum.repos.d/dag.repo为如下内容:
[dag]
name=Dag RPM Repository for RHEL4
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el4/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

4.导入key
rpm --import RPM-GPG-KEY-CentOS-4.txt(自己找找)

5.运行update:
yum update

6.升级:
yum upgrade

7.安装其它软件,例如:
yum install mplayer

没有评论: