Install yum on your vmware vma

DANGER!! Please note this will likely null and void any kind of warranty or support you may have on your vma, and it will also break vima-update depending on what you allow yum yo update, it might even cause the world to explode.. I dont know and Im not responsible for anything that goes wrong following this..

With that out of the way.. So you want to install yum on your vma so you can install some packages on your vma, and you dont want to track down rpms for it.. I had the same desire. Here is how I took care of the problem.. First I found that /etc/redhat-release stated I was using a Red Hat Enterprise Linux Server release 5.2 (Tikanga). Once I found this out I decided to use CentOS mirrors to get me a copy of yum and to update rpm and such so I could have yum.

First the base vma is missing some stuff in order to just grab yum and start using it. I found mine to be missing python-initparse, yum-fastestmirror, and yum-metadata-parser. For me I got a root shell using sudo -s, next I ran the following command from my root shell:
# rpm -Uvh

This installed yum and the missing libs I needed to use it. Next I had to create a yum.conf repo file that the system can use to pull packages from. I used the following:


# Note: yum-RHN-plugin doesn't honor this.

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

name=CentOS-5.2 - Base

#released updates
name=CentOS-5.2 - Updates

Please note the repo info like the file states can be added to a .repo file if you want, but to shorten this for me Im doing it all in 1 place. I would also suggest going though and adding things like kernel* to the excludes= section (that is really beyond what Im trying to cover here though). Once you have this minimal info in your file you can save it. Next you need to import the RPM-GPG-KEY so you can install files.. As root:

rpm --import

Now you can update things like rpm, or even install vim-common or emacs 🙂 You could also go a step further and install the epel repo and then install puppet so if you are in a large scale environment you can keep the system updated and files in sync with all your other hosts.

3 thoughts on “Install yum on your vmware vma

  1. again, please note this will break vima-update processes depending on what you allow yum to update.

Leave a Reply

Your email address will not be published. Required fields are marked *