标签:
系统环境:centos6.6
1,安装准备
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
下载最新git: #cd /opt/下
#wget https://www.kernel.org/pub/software/scm/git/git-2.7.0.tar.gz (或者从官网 http://git-scm.com/download ;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 安装在/opt/git目录
#make prefix=/opt/git install install-doc
#./configure --prefix=/opt/git
#make
#make install
#/opt/git/bin/git --version
git version 2.7.0
为了方便使用,做一个软链接
#ln -s /opt/git/bin/* /usr/bin/
即安装成功
========================================
方法二 安装目录在/usr/local
centos 6.6编译安装git-2.7.0 最新git编译安装
标签:
原文地址:http://www.cnblogs.com/igor-yang/p/5116546.html