记录一下:
开发需求,需要安装新版git,Centos6.5 yum安装最新的是1.7.1,只能通过编译安装
步骤:
1、下载新版的git
地址:https://github.com/git/git/releases@H_403_17@,选择git-2.9.3.tar.gz@H_403_17@,下载即可
2、安装依赖包
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel@H_403_17@
3、解压,编译安装(root用户下)
$ tar -zxf git-1.7.2.2.tar.gz@H_403_17@
$ cd git-1.7.2.2@H_403_17@
$ make prefix=/usr/local all@H_403_17@
$ make prefix=/usr/local install@H_403_17@
4、安装后测试
git clone git://git.kernel.org/pub/scm/git/git.git@H_403_17@
@H_403_17@
https://git-scm.com/book/zh-tw/v1/%E9%96%8B%E5%A7%8B-%E5%AE%89%E8%A3%9DGit