安装依赖包
1.yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel
2.yum install autoconf
3.下载git
http://codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.xz
4.chmod +x git-1.8.3.2.tar.gz
5.tar xzvf git-1.8.3.2.tar.gz 解压
6.cd git-1.8.3.2 进入目录
7.autoconf 出现未定义没有的话可以使用yum install autoconf 安装
8./configure --prefix=/usr/tooks/gitTool 设置安装目录
9. make
10.make install
11.git --version查看是否安装好
注:
1.出现
configure: error: no acceptable C compiler found in $PATH
是应为机器里没有安装任何C语言编译器,可以安装gcc: yum install gcc 命令安装
2.如果要修改安装位置,可以直接从8操作开始