Archive for 十一月 2011

RedHat的yum配置笔记

yum = Yellow dog Updater, Modified,主要功能是更方便的添加/删除/更新RPM包,它能自动解决包的倚赖性问题。这样对于安装软件就非常方便了。

我的系统环境为RedHat5.4企业版32位。首先将RedHat5.4安装光盘复制到/cdrom目录下。然后编辑rhel-debuginfo.repo,如下:

vi /etc/yum.repos.d/rhel-debuginfo.repo

添加:

[Cluster]
name=Red Hat Enterprise Linux $releasever – $basearch – Cluster
baseurl=file:///cdrom/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ClusterStorage]
name=Red Hat Enterprise Linux $releasever – $basearch – ClusterStorage
baseurl=file:///cdrom/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Server]
name=Red Hat Enterprise Linux $releasever – $basearch – Server
baseurl=file:///cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[VT]
name=Red Hat Enterprise Linux $releasever – $basearch – VT
baseurl=file:///cdrom/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

再编辑yumRepo.py(通过搜索remote)

vi /usr/lib/python2.4/site-packages/yum/yumRepo.py

将remote = url + ‘/’ + relative
修改为:remote = “/cdrom/Server” + ‘/’ + relative

最后运行yum clean all即完成配置。

通过以下命令来查看是否能完成集群软件的安装:

cd /cdrom/Cluster
yum install *