centos7 git upgrade to 2.9.2

#!/usr/bin/env bash
yum -y install zlib-devel curl-devel openssl-devel perl cpio expat-devel gettext-devel openssl zlib autoconf tk perl-ExtUtils-MakeMaker

yum -y remove git

rm -rf /app/git/

mkdir -p /app/git

cd /app/git

wget https://github.com/git/git/archive/v2.9.2.tar.gz

tar -xzvf v2.9.2.tar.gz

cd git-2.9.2

autoconf
./configure prefix=/usr/local/git
make
make install

echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc

source /etc/bashrc

git --version

猜你喜欢

转载自blog.csdn.net/yageeart/article/details/78947272