Git源码安装

环境

系统:CentOS 6.9
软件:git-2.9.5.tar.gz

编译安装

  • 下载源码包
    地址:https://www.kernel.org/pub/software/scm/git/

  • 安装依赖包

    # yum install curl-devel expat-devel gcc gettext-devel openssl-devel perl-ExtUtils-MakeMaker zlib-devel
    
  • 编译安装

    # tar -xzvf git-2.9.5.tar.gz
    # cd git-2.9.5
    # ./configure --prefix=/usr/local/git
    # make
    # make install
    
  • 配置环境变量

    # vim /etc/profile
    export PATH=/usr/local/git/bin:$PATH
    
    # source /etc/profile
    

你可能感兴趣的:(Git源码安装)