分类: LINUX
2011-08-02 08:30:34
AS4 安装YUM
1.RedHat AS4上如果没有安装yum,就先安装yum
#wget
# tar zxvf yum_forAS4.tar.gz 解压出以下文件
CentOS-Base.repo
python-elementtree-1.2.6-7.el4.rf.i386.rpm
python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
# rpm -ivh *.rpm 安装全部rpm
warning: python-elementtree-1.2.6-7.el4.rf.i386.rpm: V3 DSA signature: NOKEY,
key ID 6b8d79e6
Preparing... ########################################### [100%]
1:sqlite ########################################### [ 20%]
2:python-sqlite ########################################### [ 40%]
3:python-urlgrabber ########################################### [ 60%]
4:python-elementtree ########################################### [ 80%]
5:yum ########################################### [100%]
# cp CentOS-Base.repo /etc/yum.repos.d/
执行如下命令导入GPG Key
# rpm --import
现在yum就可以使用了。
CentOS-Base.repo内容如下
[base]
name=CentOS-4 - Base
baseurl=
gpgcheck=1
#released updates
[update]
name=CentOS-4 - Updates
baseurl=
gpgcheck=1
#packages used/produced in the build but not released
[addons]
name=CentOS-4 - Addons
baseurl=
gpgcheck=1
#additional packages that may be useful
[extras]
name=CentOS-4 - Extras
baseurl=
gpgcheck=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4 - Plus
baseurl=
gpgcheck=1
enabled=0
#contrib - packages by Centos Users
[contrib]
name=CentOS-4 - Contrib
baseurl=
gpgcheck=1
enabled=0