记一次git更新

1.更新相关依赖

yum remove -y git
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
yum install -y gcc perl-ExtUtils-MakeMaker

2.安装git2.2.1

wget https://github.com/git/git/archive/v2.2.1.tar.gz 
tar -zvxf v2.2.1

cd git-2.2.1

make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv

make all doc
make install install-doc install-html

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

3.测试是否更新成功

git --version

# 如出现(SSL connect error)
yum update -y nss curl libcurl openssh

猜你喜欢

转载自blog.csdn.net/u013219624/article/details/83868175
今日推荐