CentOS7.8 安装git2.18.0
下载
[root@192 opt]# wget https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz
解压
[root@192 opt]# tar zxvf git-2.18.0.tar.gz
make configure
[root@192 opt]# cd git-2.18.0
[root@192 git-2.18.0]# make configure
[root@192 git-2.18.0]# ./configure --prefix=/usr/git
[root@192 git-2.18.0]# make profix=/usr/git
[root@192 git-2.18.0]# make install
编辑/etc/profile文件,加入环境变量配置
export PATH=$PATH:/usr/git/bin
输入source /etc/profile,使之立即生效
测试
[root@192 opt]# git --version
git version 2.18.0