Wednesday, June 25, 2008

Updating RHEL to a specific version


1) Download the isos for the specific version from https://rhn.redhat.com/rhn/software/downloads/SupportedISOs.do using the rhn login.

2) Mount the CDs/DVD and copy the rpm packages in the RPMS folder in it to a particular folder like say /var/spool/RPMS/.

3) Open the file /etc/sysconfig/rhn/sources and comment the line

   #up2date default

Modify the line beginning ”# dir my-favorite-rpms ”

   dir UPDATE-RPMS /var/spool/RPMS/

Save the file and exit.

4) Run the following command

  [root@rhel ~]# up2date --configure
0. adminAddress ['root@localhost', '']
1. debug No
==SNIPPED==
19. pkgSkipList ['kernel*', '']
20. pkgsToInstallNotUp ['kernel', 'kernel-modules', 'kernel-devel', '']
==SNIPPED==
Enter number of item to edit :

Edit the pkgSkipList to include the kernel rpms for update.

5) Make sure the server is backed up in the current state ( A lot of softwares might not work after the update or might face reconfiguration etc, especially third party softwares ). Then run the command

   [root@rhel ~]# up2date -u

If all goes well the system will update to the version of the dvd we have put in the /var/spool/RPMS folder.

6) Reboot the server for the new kernel to be loaded. To verify the update, run

   [root@rhel ~]# cat /etc/redhat-release

2 comments:

Anonymous said...

Why not just run a up2date -uf (rather than change your skip list)

n said...

up2daate -uf
Perfectly valid :)