ExtMail服务器社区's Archiver

linuxsun 发表于 2009-4-13 17:03

Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 使用 YUM 自动更新

Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 使用 YUM 自动更新[url=http://bbs.linuxsun.cn/tag-Linux.html][color=#0000ff]Linux[/color][/url], [url=http://bbs.linuxsun.cn/tag-Hat.html][color=#0000ff]Hat[/color][/url], [url=http://bbs.linuxsun.cn/tag-Enterprise.html][color=#0000ff]Enterprise[/color][/url], [url=http://bbs.linuxsun.cn/tag-release.html][color=#0000ff]release[/color][/url], [url=http://bbs.linuxsun.cn/tag-Update.html][color=#0000ff]Update[/color][/url]

[table][tr][td]Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 使用 YUM 自动更新

系统版本:

Linux localhost.localdomain 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35

EDT 2007 i686 i686 i386 GNU/Linux

[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

一、

1.下载软件包:
[url=http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm][color=#0000ff]http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm[/color][/url]

2.安装(由于是RPM源码包所以安装比较特殊)

#rpmbuild --rebuild yum-2.0.8-1.src.rpm

+++++++++++++++++++安装过程+++++++++++++++++++
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires: /bin/bash /bin/sh /usr/bin/python config(yum) = 2.0.8-1

libxml2-python python rpm >= 0:4.1.1 rpm-python
Obsoletes: yum-phoebe
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/yum-

2.0.8root
Wrote: /usr/src/redhat/RPMS/noarch/yum-2.0.8-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.40887
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd yum-2.0.8
+ '[' /var/tmp/yum-2.0.8root '!=' / ']'
+ rm -rf /var/tmp/yum-2.0.8root
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.40887
+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf yum-2.0.8
+ exit 0
+++++++++++++++++++安装过程+++++++++++++++++++
[root@localhost ~]#

3.进入到:/usr/src/redhat/RPMS/noarch/
root@localhost RPMS]# cd /usr/src/redhat/RPMS/noarch/
[root@localhost noarch]# rpm -ivh yum-2.0.8-1.noarch.rpm
Preparing...                ###########################################

[100%]
   1:yum                    ###########################################

[100%]

二、配置文件部份:

[root@localhost ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]
name=Red Hat Linux $releasever - $basearch - Base
baseurl= [url=http://centos.ustc.edu.cn/centos/4/os/i386/][color=#0000ff]http://centos.ustc.edu.cn/centos/4/os/i386/[/color][/url]

[updates]
name=Red Hat Linux $releasever - Updates
baseurl= [url=http://mirror.centos.org/centos/4/updates/i386/][color=#0000ff]http://mirror.centos.org/centos/4/updates/i386/[/color][/url]


三、完成了,测试下吧。

[root@localhost noarch]# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4AS - i386 - Base
Server: Red Hat Linux 4AS - Updates
Finding updated packages
Downloading needed headers
xorg-x11-xauth-0-6.8.2-1. 100% |=========================|  84 kB   

00:01     
perl-HTML-Parser-0-3.55-1 100% |=========================| 3.5 kB   

00:00     
tar-0-1.14-12.5.1.RHEL4.i 100% |=========================| 5.1 kB   

00:00     
perl-XML-LibXML-Common-0- 100% |=========================| 1.9 kB   

00:00     
retrygrab() failed for:
  [url=http://mirror.centos.org/centos/4/updates/i386//headers/openssh-][color=#0000ff]http://mirror.centos.org/centos/4/updates/i386//headers/openssh-[/color][/url]

server-0-3.9p1-11.el4_7.i386.hdr
  Executing failover method
failover: out of servers to try
Error getting file

[url=http://mirror.centos.org/centos/4/updates/i386//headers/openssh-server-][color=#0000ff]http://mirror.centos.org/centos/ ... ers/openssh-server-[/color][/url]

0-3.9p1-11.el4_7.i386.hdr
[Errno 4] IOError: <urlopen error >

只是为了测试,我取消了更新.

[root@localhost noarch]# yum --version
2.0.8

根据网上的其它资料整理出来的,喜欢的朋友欢迎转载!
参考资料:
[url=http://www.linuxsun.cn/][color=#800080]http://www.linuxsun.cn[/color][/url][/td][/tr][/table]

mouse 发表于 2009-7-30 22:52

链接访问不了

wwmm915 发表于 2009-7-31 08:41

还有人用rhel4?都在用centos5了,

mouse 发表于 2009-7-31 09:56

还是有不少RHEL4 的,最主要是方便RHEL的人用yum,这个帖子还是很好的。学习了!

booker2688 发表于 2009-9-9 22:59

顶,我现在还在用rhel 4啊,主要是rhel4上安装一些大型的软件,比如oracle 9i有经过官方验证的

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.