赞
踩
#下载
wget https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz
#解压
tar zxvf git-2.18.0.tar.gz
#进入目录
cd git-2.18.0
#安装编译环境
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
#删除编译时自动安装的老版本git客户端
yum remove git
#在目录git-2.18.0中编译
make prefix=/opt/setup/soft_install/git_exe all
#在目录git-2.18.0中安装
make prefix=/opt/setup/soft_install/git_exe install
vim /etc/profile
source /etc/profile
[root]# git --version
git version 2.18.0
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。