How to Install Latest GIT on RHEL 6/CentOS 6

by
Share this Article: Facebook12Google+2Twitter7LinkedIn0Reddit0Pinterest0StumbleUpon0Digg
So you want to setup a GIT Repository for your developers on RHEL 6/CentOS 6, but notice Red Hat Enterprise Linux 6 contains 1.7.1 in the repositories, which is well behind the current 1.8.3 that is available for GIT at http://git-scm.com.

Well no need to worry, it is easy enough to download and install the latest on a typical RHEL/CentOS installation.

First let’s download all the files that are required for GIT installation:

$ wget http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz
$ wget -O git-manpages-1.8.3.4.tar.gz http://code.google.com/p/git-core/downloads/detail?name=git-manpages-1.8.3.4.tar.gz&can=2&q=

Next, install all required libraries before building GIT:

$ sudo yum install zlib-devel perl-CPAN gettext

Now let’s untar and build and install GIT in the /usr directory:

$ tar xvfz git-1.8.3.4.tar.gz
$ cd git-1.8.3.4
$ ./configure
$ make
$ sudo make prefix=/usr install
$ git --version
git version 1.8.3.4

That’s all you need and now you are ready to configure your repository for access and start developing!

Now if you want to update GIT you can do that using GIT itself:

$ git clone git://git.kernel.org/pub/scm/git/git.git

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook12Google+2Twitter7LinkedIn0Reddit0Pinterest0StumbleUpon0Digg