Since the GIT version installed by Centos6.5 using yum-y install git is
Git--version
git version 1.7.1
Want to upgrade to 2.2.1:
># Yum Remove 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" >>/ETC/BASHRC
># SOURCE/ETC/BASHRC
># git--version
>git version 2.2.1
Third, the installation of errors
1, error:msgfmt po/de.msg make[1]: * * * [PO/DE.MSG] Error 127
Solution: Yum install TK zlib-devel openssl-devel perl cpio expat-devel Gettext-devel
2, Errro:asciidoc:command not found
Solution: Yum install-y AsciiDoc
3, Errro:xmlto:command not found
Solution: Yum install-y Xmlto
Finally, the best time to install git is to install dependencies.
Yum install-y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel AsciiDoc Xmlto
An error is also reported when you execute make all doc here
Usr/bin/perl makefile.pl prefix= '/usr/local/git ' install_base= '--localedir= '/usr/local/git/share/locale '
Can ' t locate extutils/makemaker.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64/ Perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/perl5.) At makefile.pl Line 3.
BEGIN failed--compilation aborted at makefile.pl Line 3.
MAKE[1]: * * * [Perl.mak] Error 2
Make: * * * [Perl/perl.mak] Error 2
Workaround:
Yum Install Perl-extutils-makemaker Package
Reference:
Http://www.centoscn.com/image-text/config/2015/0913/6169.html
Http://my.oschina.net/indestiny/blog/223082?fromerr=3h9La6Pw
CentOS Installation git2.2.1