Background Link to heading

I was sitting in the train in India and didn’t really have a sufficiently fast Internet connection available to me (nor did I want to pay the rather excessive 3g mobile Internet fees) that would enable me to download and install packages in my new CentOS installation.

I searched high and low for “local” installations from DVD media using yum, which automatically determines and installs dependencies (unlike RPM).

After looking at the yum man page, reading a few comments on the web and some experimentation I came up with the solution (for CentOS 5.6):

Steps Link to heading

1. Insert DVD Link to heading

Insert DVD (in my case I was using an ISO image in VirtualBox)

Wait for media to be mounted and then issue (find the mount point - then make a specific /media/CentOS link):

mount
# Check output to find the mount point

ln -s /media/CentOS_5.6_Final/ /media/CentOS

3. Install Packages with YUM Link to heading

Now run yum to install packages, e.g. (disable all repo’s but enable the CentOS 5 media):

yum --disablerepo=* --enablerepo=c5-media -y install compat-libstdc++-33

4. Cleanup Link to heading

Afterwards eject DVD and remove link:

rm /media/CentOS

Originally published at https://jensenmo.blogspot.com/2012/03/i-was-sitting-in-train-in-india-and.html