# jenkins配置git
# 检测当前git版本是否是2.7.4以上
git --version
# 如果没有安装git直接源码安装即可,如果安装了先删除原来的git
yum -y remove git
# 先安装编译git需要的包
yum -y install zlib-devel perl-CPAN gettext curl-devel expat-devel gettext-devel openssl-devel
# 下载和安装
mkdir /tmp/git && cd /tmp/git
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz
tar zxvf git-2.9.0.tar.gz
cd git-2.9.0
./configure
make
make prefix=/usr/local instal
# 查看git安装位置
which git
# jenkins配置