当前位置: 首页 > 图文教程 > 服务器 > Linux服务器 > RHEL4 通过yum自动升级实现

Linux服务器
apache的access.log和error.log减肥
Ubuntu linux 安装 PHP5.3.0的命令
正确维护配置Apache服务器的方法 保护系统安全
lftp 贴心好友 备份服务器bash脚本
解決安裝了apache却找不到服务的问题
Linux 配置WWW服务器全攻略
给您的U盘安装linux
Linux目录的创建与删除命令
Linux文件的复制、删除和移动命令
实用的Linux网络配置工具netconf
教程精选:正则表达式快速入门
linux root 密码忘了怎么办?
服务器应用:Linux下如何用好新闻组(3)
服务器应用:Linux下如何用好新闻组(2)
服务器应用:Linux下如何用好新闻组(1)
快速搭建Samba服务器
Linux:rsync服务器的快速搭建和使用
Linux服务器上的备份和恢复
为主流服务器操作系统配置Ipv6:IPv4和IPv6技术对比
Linux配置web服务器全攻略

Linux服务器 中的 RHEL4 通过yum自动升级实现


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 35 ::
收藏到网摘: n/a

第一种方法:
yum源来自chinalinuxpub.com,用的是centos包,
下载地址:  http://www.chinalinuxpub.com/yum.tgz
安装:
tar zxvf yum.tgz
cd yum
rpm -ivh *.rpm

rm -rf /etc/yum.repos.d/CentOS-Base.repo
vi /etc/yum.repos.d/as4-update.repo
加入:
#released updates
[update]
name=Red Hat Enterprise AS release 4 Updates
baseurl=http://ftp.chinalinuxpub.com/redhat/enterprise/updates/4AS/
gpgcheck=1
gpgkey=http://ftp.chinalinuxpub.com/redhat/enterprise/RPM-GPG-KEY-linuxpub

vi /etc/yum.repos.d/as4-base.repo
加入:
#released base
[base]
name=Red Hat Enterprise AS release 4 Updates
baseurl=http://ftp.chinalinuxpub.com/redhat/enterprise/os/i***/RedHat/
gpgcheck=1
gpgkey=http://ftp.chinalinuxpub.com/redhat/enterprise/RPM-GPG-KEY-linuxpub

然后就可以正常使用yum了.

第二种方法:利用CentOS 的yum库升级RHEL AS4
1.下载并安装yum-2.4.0-1.centos4.noarch.rpm文件,下载地址为:
ftp://ftp.pbone.net/mirror/ftp.centos.org/4.2/os/alpha/CentOS/RPMS/yum-2.4.0-1.centos4.noarch.rpm

2.修改或建立/etc/yum.repos.d/CentOS-Base.repo为如下内容:
[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.riken.jp/Linux/caos/centos/4.0/os/$basearch/
gpgcheck=1

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://ftp.riken.jp/Linux/caos/centos/4.0/updates/$basearch/
gpgcheck=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://ftp.riken.jp/Linux/caos/centos/4.0/addons/$basearch/
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.riken.jp/Linux/caos/centos/4.0/extras/$basearch/
gpgcheck=1

3.修改或建立/etc/yum.repos.d/dag.repo为如下内容:
[dag]
name=Dag RPM Repository for RHEL4
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el4/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

4.运行update:
yum update

5.升级:
yum upgrade

6.安装其它软件,例如:
yum install mplayer