一、下载

    cd /mnt/git  下载到这个目录

    wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz

    yum install curl-devel 

    yum install libcurl-devel  要把这两个安装上,如果使用git会报https相关的错误

二、安装配置

    tar -zxvf git-2.9.0.tar.gz   
    cd git-2.9.0   
    ./configure --prefix=/usr/local/git   
    make  
    make install  

三、环境变量

   vim /etc/profile 

   export PATH=/usr/local/git/bin:$PATH     加在文件最后然后保存

   source /etc/profile    使配置生效

   git --version   查看版本

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐