Wednesday, August 21, 2013

How to Install Git 1.8.3.4 on CentOS 6.4

  1. Check the CentOS version
  2. $ cat /etc/redhat-release
    CentOS release 6.4 (Final)
    
  3. Check git version
  4. $ git --version
    git version 1.7.1
    
  5. Enable/disable yum proxy settings (find/add "proxy" string with related proxy server)
    $ vim /etc/yum.conf
    
  6. Try to update git via yum package manager. But you will get the message that git is up to date
  7. $ sudo yum update git 
    
  8. Based on instruction from Getting Started Installing Git install git from sources:
  9. $ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc
    $ wget https://www.kernel.org/pub/software/scm/git/git-1.8.3.4.tar.gz
    $ tar xzvf git-1.8.3.4.tar.gz
    $ cd git-1.8.3.4
    $ sudo make prefix=/usr/local all
    $ sudo make prefix=/usr/local install
    
  10. Re-run bash shell and verify the current git version
  11. $ git --version
    git version 1.8.3.4
    
References:

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. $ wget https://www.kernel.org/pub/software/scm/git/git-1.8.3.4.tar.gz
    $ tar xzvf git-1.8.3.4.tar.gz

    can become

    $ wget -qO- https://www.kernel.org/pub/software/scm/git/git-1.8.3.4.tar.gz | tar xzv

    ReplyDelete