Search This Blog

Thursday, December 11, 2008

Update Redhat4 Linux System via yum with the local repository

This small write up explains how to upgrade the RedHat linux system from one releaseto another one. For example you have RedHat linux 4 Update 2 installed and now youwant to update this to the latest one for example 7.
You can use the yum to do this on a local RPM repository.
1. Download the related rpm files
Set the http_proxy as we need to download some files from the internet.
export http_proxy=http://www-proxy.us.oracle.com/
wget wget http://iasbde.us.oracle.com/ohs_scripts/yum-2.0.7-1.noarch.rpm

2. Install these RPM's by using the command
rpm -ivh yum-2.0.7-1.noarch.rpm

3. Download the latest the RedHat linux version 4 from kernel.us.oracle.com
http://kernel.us.oracle.com/osinstall/RedHat/RHEL4/i386/AS/U7/RHEL4.7-i386-AS-DVD.iso
4. mount this ISO image
mount -o loop -t iso9660 RHEL4.7-i386-AS-DVD.iso /mnt/test

5. Copy all the RPM's to a local directory mkdir /home/localrpmscp /mnt/test/RedHat/RPMS/* /home/localrpms

6. Create the necessary header and other related files for the yum
cd /home/localrpms
yum-arch .

7. Open the /etc/yum.conf fileand change the entries of baseurl toi.e.from#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/tobaseurl=file:///home/RPMS
Modified yum.conf file
[main]cachedir=/var/cache/yumdebuglevel=2logfile=/var/log/yum.logpkgpolicy=newestdistroverpkg=redhat-releasetolerant=1exactarch=1
[base]name=Red Hat Linux $releasever - $basearch - Basebaseurl=file:///home/RPMS
[updates]name=Red Hat Linux $releasever - Updates#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/baseurl=file:///home/RPMS

8. yum update
Once the update is complete, you will need to reboot the system. It should automatically boot into the new kernel. If this does not happen, then you will need to update the /boot/grub/grub.conf file. The line 'default=0' means the first kernel listing. After yum completes, the new kernel should be the first listed.
If you have not installed previous iAS products, you will also want toperform the following so that all the packages needed are present.
# yum install gnome-libs
# yum install gnome-libs-devel
'yum update' or 'yum install ' to add additional or missing packages.

2 comments:

Unknown said...

[root@milennium1 core]# yum install gnome-libs
Loaded plugins: rhnplugin, security
Setting up Install Process
No package gnome-libs available.
Nothing to do
[root@milennium1 core]#

Unknown said...

[root@milennium1 core]# yum install gnome-libs
Loaded plugins: rhnplugin, security
Setting up Install Process
No package gnome-libs available.
Nothing to do
[root@milennium1 core]#