我的電腦平台是dell的d620,安裝了rehhat5 client 和windows xp雙系統。
但是感覺rhel 5 使用本地源更新設置比較繁瑣,而且不能更新到最新的包。
在網上搜到了一篇相關的帖子,便按照指導安裝並成功。記錄下安裝過程。
以便備用。
1.配置yum
先把RHEL5自帶的yum包刪除,rpm -qa | grep yum,出來4個包,全部rpm -e 掉,還有一個RedHat-release,這個要—nodeps。然後從http://CentOS.ermly.com/centos/5.1/os/下載CentOS的4個與yum有關的包及centos-release-5-0.0安裝。安裝後的包如下
yum-metadata-parser-1.0-8.fc6
yum-3.0.5-1.el5.centos.5
yum-updatesd-3.0.5-1.el5.centos.5
修改yum的配置文件,vi /etc/yum.repos.d/CentOS-Base.repo
# 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-5.1 - Base
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/os/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-5.1 - Updates
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/updates/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5.1 - Addons
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/addons/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5.1 - Extras
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/extras/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.1 – Plus
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/centosplus/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5.1 - Contrib
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://ftp.daum.net/centos/5.1/os/$basearch/
http://mirror.secuidc.com/centos/5.1/os/$basearch/
http://centos.ermly.com/centos/5.1/contrib/$basearch/
http://ftp.hostrino.com/pub/centos/5.1/os/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ermly.com/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
為了保證源的可用性,我添加了多個國內的centos源。
導入rpm包的GPG密鑰
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
3. Update
在終端下面執行yum -y update。遇到網速不好,重試幾次,可以完全下載,共有538M之多。此時提示與redhat-logos沖突,繼續rpm -e -nodeps redhat-logos,再次yum -y update,這時Updating, CleanUp, Complete!
4.修復gdm登錄界面
重啟後已經可以看到RHEL5改頭換面成CentOS了,但是到gdm登錄界面時提示出錯,意為找不到gdm的相關主題。沒關系,可以登錄,只不過界面難看一點。進入Gnome桌面後,登錄http://art.gnome.org下載一個自己喜歡的gdm logo theme. 在終端輸入gdmsetup,把剛才下載的tar.gz拖到對話框中安裝,再把默認的Redhat刪除就OKay了!
5.加快你的yum的速度.
使用yum的擴展插件yum-fastestmirror,個人認為這個插件非常有效,速度真的是明顯提高, #yum -y install yum-fastestmirror
注意,在Centos 4上,名字叫yum-plugin-fastestmirror
6.擴展你的rpm包
好多包官方沒有,怎麼搞定他.要我自己編譯嗎?
好了,你安裝這個包,這個是redhat5的哦。你可以自己到
http://dag.wieers.com/rpm/FAQ.php#B
這來找
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
技巧3:rpm查找.