Skip to content

Instantly share code, notes, and snippets.

@mansurali901
Created April 6, 2018 05:50
Show Gist options
  • Save mansurali901/c47ab1b51ca4d0da7781f1055eeb590d to your computer and use it in GitHub Desktop.
Save mansurali901/c47ab1b51ca4d0da7781f1055eeb590d to your computer and use it in GitHub Desktop.
#!/bin/bash
# Author Mansur Ul Hasan
# EMail : [email protected]
# Script is setup to git client 2.5
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz
tar xzf git-2.5.3.tar.gz
cd git-2.5.3
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo 'pathmunge /usr/local/git/bin/' > /etc/profile.d/git.sh
chmod +x /etc/profile.d/git.sh
source /etc/bashrc
/usr/local/git/bin/git --version
ln -s /usr/local/git/bin/git /usr/bin/git
ln -s /usr/local/git/bin/git-cvsserver /usr/bin/git-cvsserver
ln -s /usr/local/git/bin/gitk /usr/bin/gitk
ln -s /usr/local/git/bin/git-receive-pack /usr/bin/git-receive-pack
ln -s /usr/local/git/bin/git-shell /usr/bin/git-shell
ln -s /usr/local/git/bin/git-upload-archive /usr/bin/git-upload-archive
ln -s /usr/local/git/bin/git-upload-pack /usr/bin/git-upload-pack
git --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment