Skip to content

Instantly share code, notes, and snippets.

@M3lkior
Created March 1, 2018 16:38
Show Gist options
  • Select an option

  • Save M3lkior/0dbb26fbee4ab5da9479c24a58a586a7 to your computer and use it in GitHub Desktop.

Select an option

Save M3lkior/0dbb26fbee4ab5da9479c24a58a586a7 to your computer and use it in GitHub Desktop.
Git install from archive
# Based on https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7#option-two-%E2%80%94-install-git-from-source
yum groupinstall "Development Tools"
yum install gettext-devel openssl-devel perl-CPAN perl-devel
#if necessary
#yum install zlib-devel
#yum install perl-ExtUtils-MakeMaker
export GIT_VERSION='2.16.2'
wget https://github.com/git/git/archive/v$GIT_VERSION.tar.gz -O /tmp/git.tar.gz
su -c 'tar -zxvf /tmp/git.tar.gz' -C /tmp'
cd /tmp/git-*
make configure
./configure --prefix=/usr/local
make install
# check with git --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment