Install Git 1.7 on CentOS 5

Here's a quick tutorial on how to compile and install Git 1.7 on CentOS 5. You'll need a few dependencies before you start.

yum install zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl-devel gcc


Git

cd /usr/local/src

wget http://kernel.org/pub/software/scm/git/git-1.7.3.2.tar.bz2

tar xvf git*.*

cd git*

make prefix=/usr/local all

make prefix=/usr/local install

git --version