Thursday, October 27, 2011

How to Install GIT on Red Hat Enterprise Linux 6?

Download all the files that you required for git installation.

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

Install all required library before you continue building git if you haven't done this before or if your RHEL 6 is a fresh install.
  rayarn@erp: sudo yum install zlib-devel
  rayarn@erp: sudo yum install perl-CPAN
  rayarn@erp: sudo yum install gettext

Now let's make this a straightforward approach because the reason why you're reading this blog is to know how to install GIT to Red Hat Enterprise Linux 6 (RHEL 6) and I hope I am not required to explain all the command.

  rayarn@erp: tar xvfz git-1.7.7.1.tar.gz
  rayarn@erp: cd git-1.7.7.1
  rayarn@erp: ./configure
  rayarn@erp: make
  rayarn@erp: sudo make prefix=/usr install
  rayarn@erp: git --version

Expected output should be: git version 1.7.7.1

 



4 comments:

SREE said...

Thanks a lot

Anonymous said...

finally a working instruction. Thx allot!

Anonymous said...

Can we install GIT 1.7.3 on RHEL 6?
Please reply

i360 said...

I haven't tried GIT 1.7.3. I used version 1.7.7. You can find GIT RPM from this URL [http://pkgs.repoforge.org/git/] if you want to try a different approach using RPM.