csatblogspotdotcom

Thursday, January 15, 2009

rpmforge:好东西

这段时间在rhel5(x86_64)上装mercurial(想用hg命令),源上没有,在其官网上下载的又装好或是装上了却不能正常运行,最后在google里搜到了一个方法:安装rpmforge。
先装yum-priorities:
yum install yum-priorities

注意:在/etc/yum/pluginconf.d/priorities.conf中enabled=1而且/etc/yum.conf中plugins=1

接下来可以设置priority了,例如:
[rhel_dvd]
name=Red Hat Enterprise Linux $releasever-$basearch-Cluster
baseurl=ftp://IP/pub/rhel5/
enabled=1
priority=1
priority值越小,优先级越高。
一般的,
base, addons, updates, extras should be priority=1
centosplus, contrib should priority=2

接下来是rpmforge的安装:
先下载rpm安装包:
wget http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
再导入key:rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
然后验证:rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
并安装:rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
这下子在/etc/yum.repos.d中多了两个文件:rpmforge.repo和mirrors-rpmforge(原来rpmforge的作用就是安装一个repo并提供源,据说它提供的源是centos官方最信赖并推荐的源)。
下一步是设置priority=9(自己设)并测试一下:yum check-update
最后安装mercurial:
yum install mercurial
OK,一次成功

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home