In order to use GitHub, Git is installed, version 1.7.1, for chasing new me, I think this version is a bit old. Because the git version is up to 2.2. So I decided to upgrade to the latest version, in order to you can not detours, please pay attention to see paragraph three or four.
First, uninstall the old version of Git.
#yum remove-y git
Second, install the new version of Git
1, #wget 2, #tar XF v2.2.1.tar.gz3, #cd git-2.2.14, # Make Configure5, #./configure--prefix=/usr/local/git--with-iconv=/ USR/LOCAL/LIBICONV6, # make all doc7, # make install Install-doc install-html8, # echo "Export path= $PATH:/usr/local/git/ Bin ">>/etc/bashrc># SOURCE/ETC/BASHRC
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
Iv.. Testing
After the installation is complete, the operation of the two, 8 write paths is performed because it is not in the system path.
#git--version
#git version 2.2.1
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
This article is from the "Cool bit Linux" blog, so be sure to keep this source http://coolbyte.blog.51cto.com/8289854/1694106
CentOS upgrade git to advanced version