Centos upgrade git to advanced version
To use github, git is installed with version 1.7.1. I think this version is a little old for me. Because all git versions are up to 2.2. So I decided to upgrade to the latest version. Please check the three or four sections to avoid detours.
1. Uninstall the old version of git first.
# Yum remove-y git
Ii. Install the new version of git
1、#wget2、#tarxfv2.2.1.tar.gz3、#cdgit-2.2.14、#makeconfigure5、#./configure--prefix=/usr/local/git--with-iconv=/usr/local/libiconv6、#makealldoc7、#makeinstallinstall-docinstall-html8、#echo"exportPATH=$PATH:/usr/local/git/bin">>/etc/bashrc>#source/etc/bashrc
Iii. Installation 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. Detection
After the installation is complete, because it is not in the system path, perform the write Path 2 and 8 operations.
# Git -- version
# Git version 2.2.1
Finally, we recommend that you install the dependency once when upgrading and installing git.
Yum install-y tk zlib-devel openssl-devel perl cpio expat-devel gettext-develasciidocxmlto