1. 程式人生 > >git版本升級

git版本升級

git 升級 Gitlab

Git版本升級(查看版本信息 git version)
舊版本:git version 1.7.1
新版本:git version 2.2.1

一、安裝依賴包:
1、下載安裝 libiconv-1.14.tar.gz

wget  http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install

2、yum安裝依賴包

yum -y  install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc gcc perl-ExtUtils-MakeMaker tcl xmlto

註:asciidoc如果無法通過yum安裝,請下載包,編譯安裝

wget --no-check-certificate https://jaist.dl.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.zip
unzip asciidoc-8.6.9.zip
cd asciidoc-8.6.9
./configure
nake && make install

二、安裝 新版git包

wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz
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:/usr/local/git/libexec/git-core" >> /etc/bashrc

三、查看新版本

 git version

技術分享圖片

git版本升級