1. 程式人生 > >記一次git更新

記一次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