System Environment: centos6.6
1, installation Preparation
Yum-y install gcc zlib-devel openssl-devel perl cpio expat-devel gettext-devel OpenSSL zlib Curl autoconf tk
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
Yum Install perl-extutils-makemaker packageyum install Gettext-develyum install Asciidocyum install Xmlto
Download the latest git: #cd/opt/
#wget https://www.kernel.org/pub/software/scm/git/git-2.7.0.tar.gz (or http://git-scm.com/download from official website; http:// Git-core.googlecode.com/files)
#tar ZXVF git-2.7.0.tar.gz
#cd git-2.7.0
#make Prefix=/opt/git all doc installed in the/opt/git directory
#make prefix=/opt/git Install Install-doc
#./configure--prefix=/opt/git
#make
#make Install
#/opt/git/bin/git--version
git version 2.7.0
For ease of use, make a soft link
#ln-S/opt/git/bin/*/usr/bin/
Installation is successful
========================================
Method two installation directories in/usr/local
================================================= Fast Install git latest version (UPDATE): $ git clone git://git.kernel.org/pub/scm/git/ git.git$ make prefix=/usr/local All (compile) $ sudo make prefix=/usr/local install (installation) =========================== ======================
CentOS 6.6 Compilation Installation git-2.7.0 latest git compilation installation