How to Upgrade Centos 5.7 using Centos 5.8 ISO image on Vmware workstation

Dear Linux Experts,

On my windows 7 desktop with the help of Vmware workstation (Version 7.1),
created virtual machine and installed Centos 5.7 successfully using ISO image.
Query : Is this possible to upgrade the Centos 5.7 using Centos 5.8 ISO image to Centos version 5.8?.. if yes kindly guide me the procedure to upgrade.

Thanks in advance,
Ananth

Yes, it is possible to do what you want to do. Essentially, what you need to do is create a local repository containing the Centos 5.8 packages and upgrade your system using that repository.

# mkdir -p /var/www/html/dvd/iso
# mount -o loop /your.iso /var/www/html/dvd/iso
# cd /var/www/html/dvd
# createrepo .
# yum clean all

Create a file /etc/yum.repos.d/file.repo which should have the contents as mentioned below:

[My-Repository]
name=My repository
baseurl=file:///var/www/html/dvd
enabled=1
gpgcheck=0 

When you do "yum list" you should be able to see the new repository. If so, then you can use "yum upgrade" to upgrade your system.

Thanks fpmurphy!...It worked !...I followed your steps and upgraded to CentOS 5.8.

I have couple of queries which I could not understand during the upgrade. Kindly clarify the below queires:
1.I have image CentOS 5.8 ISO image in the hard drive and I tried to mount this to virtual machine running with CentOS 5.7 and it got mounted as (/media/CentOS_5.8_Final). When I checked the contents in the mounted directory (/media/CentOS_5.8_Final) , i could see lot of release notes and few directories like isolinux,Centos,etc.,. but unable to find the ISO image file..
In this scenario, i was unable to perform the upgrade.Later I burnt the Centos 5.8 ISO image file in the DVD and mounted it. By doing this , i could see the ISO image file .
Please clarify what is the difference when we mount the ISO image from the hard drive and the same image burnt in DVD ?

2.I mounted the ISO image and ran "yum list"..and got error. Later then I connected my system to internet and re-run "yum list" and it worked.

To upgrade from 5.7 to 5.8 , Do we need internet connection mandatory, without internet connection can't we do the upgrade.?.

Please clarfiy these two questions..so that it would be helpful to understand.

Thanks,
Ananth