CentOS 最新版本git的安裝教程


CentOS6.5自帶的git版本是1.7.1

卸載自帶的git

?
1
# yum remove git

下載最新版git

解壓

?
1
2
# tar zxvf v2.9.2.tar.gz
# cd git-2.9.2

編譯安裝

?
1
2
3
4
# make configure
# ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
# make all doc
# sudo make install install-doc install-html

修改環境變量

?
1
# sudo vim /etc/profile

在最后一行添加

?
1
export PATH= /usr/local/git/bin :$PATH

保存后使其立即生效

?
1
# source /etc/profile

查看是否安裝成功

?
1
#git --version

在pycharm中修改git指向

File->Settings->Version Control->Git->Path to Git executable:

選擇/usr/local/git/bin/git


免責聲明!

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



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