Wednesday, August 21, 2013

How to Install Git 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
    $ tar xzvf git-
    $ cd git-
    $ 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