Skip to content

Instantly share code, notes, and snippets.

@igorferreira
Created July 21, 2017 16:19
Show Gist options
  • Save igorferreira/47af1b4452807068e7848c69f1c09c7d to your computer and use it in GitHub Desktop.
Save igorferreira/47af1b4452807068e7848c69f1c09c7d to your computer and use it in GitHub Desktop.
# dependencias git
sudo yum install autoconf libcurl-devel expat-devel gcc gettext-devel kernel-headers openssl-devel perl-devel zlib-devel -y
# remove git
rpm -qa | grep "git"
rpm -e --nodeps "git-1.8.3.1-6.el7_2.1.x86_64"
# create dirs
mkdir -p /opt/git/src
# download
cd /opt/git
wget https://www.kernel.org/pub/software/scm/git/git-2.9.4.tar.gz
mv git-2.9.4.tar.gz ./src
# descompact
tar xzf git-2.9.4.tar.gz
# link para pasta de sistema
cd /usr/src
sudo ln -s /opt/git/src/git-2.9.4 git-2.9.4
# compila
make clean
make configure
./configure --prefix=/usr/local/git
make prefix=/usr/local/git all
make prefix=/usr/local/git install
# adiciona no bashrc
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment