Update git 1.7 to most recent version 2.0.4 on centos 6 script



  • #install dependencies
  • yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel && yum -y install gcc perl-ExtUtils-MakeMaker
  • #remove old version
  • yum -y remove git
  • #install git 2 most recent src
  • cd /usr/src
  • wget https://www.kernel.org/pub/software/scm/git/git-2.0.4.tar.gz
  • tar xzf git-2.0.4.tar.gz
  • #remove backup
  • rm -f git-2.0.4.tar.gz
  • #build git
  • cd git-2.0.4
  • make prefix=/usr/local/git all
  • make prefix=/usr/local/git install
  • #add to path
  • echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
  • source /etc/bashrc
  • #verify successful installation
  • git --version
  • No comments:

    Post a Comment