【Linux、Git】CentOS7 升级Git至2.4.0版本
1. 安装依赖包
yum -y install zlib-devel curl-devel openssl-devel perl cpio expat-devel gettext-devel openssl zlib autoconf tk perl-ExtUtils-MakeMaker
2.获取最新版 Git 源码包、解压、进入git目录
wget https://github.com/git/git/archive/v2.4.0.tar.gz tar zxvf v2.4.0.tar.gz
cd git-2.4.0
3.编译安装
autoconf ./configure make make install
4.修改配置
vim /etc/ld.so.conf # 最后一行添加
/usr/local/lib
5.重启、查看git版本
reboot
git version
参考文章:
https://www.jianshu.com/p/fae802f50315