Red Hat Enterprise Linux AS release 4 (Nahant Update 4)简称as4.
Linux上常用的安装和升级工具主要有yum和apt,其中yum能更好的解决rpm的依存性问题,推荐使用yum。
在标准的Redhat Enterprise Linux上,默认没有安装yum,需要单独下载并安装。
以下是安装yum的步骤:
1、首先安装yum和相关的rpm包。
注意:本安装包只提供给as4系统之用
[url]http://www.swsoft.com.cn/downloads/Prima/Tools/yum_forAS4.tar.gz[/url]或
[url]http://www.haoxm.net/tools/yum_forAS4.tar.gz[/url]下载yum_forAS4.tar.gz。
2、解压缩并安装。
[root@DEV-191 aio]# tar zxvf yum_forAS4.tar.gz
yum_forAS4/
yum_forAS4/CentOS-Base.repo
yum_forAS4/python-elementtree-1.2.6-7.el4.rf.i386.rpm
yum_forAS4/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
yum_forAS4/yum-2.4.2-0.4.el4.rf.noarch.rpm
yum_forAS4/sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum_forAS4/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
[root@DEV-191 aio]# cd yum_forAS4
[root@DEV-191 yum_forAS4]# rpm -ivh *.rpm
警告:python-elementtree-1.2.6-7.el4.rf.i386.rpm: V3 DSA ?章:NOKEY, key ID 6b8d79e6
??中... ########################################### [100%]
1:sqlite ########################################### [ 20%]
2:python-sqlite ########################################### [ 40%]
3:python-urlgrabber ########################################### [ 60%]
4:python-elementtree ########################################### [ 80%]
5:yum ########################################### [100%]
3. 将解压缩后得到的CentOS-Base.repo复制到/etc/yum.repos.d/目录里边.
注意:本CentOS-Base.repo文件只提供给as4系统之用
[root@DEV-191 yum_forAS4]# cp CentOS-Base.repo /etc/yum.repos.d/
4. 执行如下命令导入GPG Key.
[root@DEV-191 yum_forAS4]# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4或
[root@DEV-191 yum_forAS4]# rpm --import http://www.haoxm.net/tools/RPM-GPG-KEY-CentOS-4
yum安装完毕,可以使用。yum的主要参数包括search/install/upgrade/remove
[root@DEV-191 yum_forAS4]# yum
You need to give some command
usage: yum [options] < update | install | info | remove | list |
clean | provides | search | check-update | groupinstall |
groupupdate | grouplist | groupinfo | groupremove |
makecache | localinstall | erase | upgrade | whatprovides |
localupdate | resolvedep | shell | deplist >
options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
--exclude=[package] exclude package(s) by name or glob
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
*****
在64位linux中运行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.
It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Feb 18 2008, 17:16:53)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
原因是:python-elementtree-1.2.6-7.el4.rf.i386.rpm是针对32位系统的。
解决方法:下载针对64位的python-elementtree-1.2.6-7.el4.rf.x86_64.rpm重新安装即可。
*****
======================================
安装libaio
===================================
[root@DEV-191 yum_forAS4]# yum install libaio
Setting up Install Process
Setting up repositories
update 100% |=========================| 1.9 kB 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 381 kB 00:03
update : ################################################## 908/908
Added 908 new packages, deleted 0 old in 11.02 seconds
primary.xml.gz 100% |=========================| 611 kB 00:02
base : ################################################## 1599/1599
Added 1599 new packages, deleted 0 old in 13.81 seconds
primary.xml.gz 100% |=========================| 190 B 00:00
Added 0 new packages, deleted 0 old in 0.02 seconds
primary.xml.gz 100% |=========================| 40 kB 00:00
extras : ################################################## 146/146
Added 146 new packages, deleted 0 old in 0.99 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libaio to pack into transaction set.
libaio-0.3.105-2.i386.rpm 100% |=========================| 6.8 kB 00:00
---> Package libaio.i386 0:0.3.105-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libaio i386 0.3.105-2 base 18 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 18 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libaio-0.3.105-2.i 100% |=========================| 18 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libaio ######################### [1/1]
Installed: libaio.i386 0:0.3.105-2
Complete!