Installing yum and git on a MediaTemple (dv) 3.5

I recently decided to install Git on my (dv) 3.5 and found an article written by the guys at MediaTemple, my hosts, with instructions on how to do it (isn’t it nice when someone else does the hard graft for you?!) Unfortunately, the article was old and inaccurate. Luckily, with a bit of digging around I managed to get yum installed, updated and ready for Git.

The problem with the (mt) article is it’s outdated. The URI they provide with the initial rpm command is non-existent. It produces a lovely little 404 error, which rpm reports as follows…

# rpm -Uvh http://mirror.centos.org/centos/5.1/os/i386/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm
 
Retrieving http://mirror.centos.org/centos/5.1/os/i386/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm
error: skipping http://mirror.centos.org/centos/5.1/os/i386/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm - transfer failed - Unknown or unexpected error
warning: u 0x807d980 ctrl 0x807e148 nrefs != 0 (mirror.centos.org http)

First of all we need the “yum-metadata-parser.” If you don’t install this dependency the yum install will fail.

# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm

Now we can install yum itself.

# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm

This link may no longer be accurate in the future as the rpm package includes a version number. If CentOS decide to no longer mirror the download we’ll need to track down the latest version and rpm that instead.

Once this is all installed we can update yum using “yum update.” When I ran the update there were roughly 142 packages to update totalling around 245 MB of actual data. It was done pretty sharpish thanks to (mt)’s huge pipe!

The git package is available via EPEL repository so we need to run another rpm command in order to search this repository when using yum.

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

With yum up to date and access to the EPEL repository we can finally install git.

yum install git

Leave a Reply