centos6 升級Git版本


操作步驟如下:

yum remove -y git  #卸載舊版本Git
yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel  asciidoc xmlto autoconf  #安裝依賴,否則一路報錯....
wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz  
tar xf v2.2.1.tar.gz
cd git-2.2.1
make configure 
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv   #添加 iconv 支持
make all doc  #編譯並生成幫助文檔
make install install-doc install-html #安裝程序
echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bash_profile
echo "export GIT_SSL_NO_VERIFY=1" > ~/.bash_profile     (如果不加入這句會出現fatal Peer certificate cannot be authenticated with known CA certificate)
source ~/.bash_profile
git --version

Git 項目地址:https://github.com/git/git

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM