centos7安装最新版git

1、下载编译工具

             yum -y groupinstall "Development Tools"

2、下载依赖包

                    yum  -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel

3、下载 git 最新版本的源代码

                wget https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz

4、解压

                 tar -zxvf git-2.11.0.tar.gz

5、进入目录配置

                    ./configure --prefix=/usr/local/git

6、安装

                    make && make install

7、配置全局路径

        export PATH="/usr/local/git/bin:$PATH"

        source /etc/profile

你可能感兴趣的:(centos7安装最新版git)