美文网首页程序员
redhat 7x / centos 7x 安装 git 2.1

redhat 7x / centos 7x 安装 git 2.1

作者: 默浑秩 | 来源:发表于2018-04-21 10:40 被阅读0次

    redhat / centos 安装 git 2.16

    唠个五毛钱的

    redhat 7x / centos 7x 自带的git版本太低,自己编译又太费精力,找到一个好方法,特此记录备忘


    环境

    • redhat 7x / centos 7x

    操作

    1. 查询redhat版本
    cat /etc/redhat-release # redhat
    cat /etc/centos-release # centos
    
    1. 卸载现有git
    yum remove git -y
    
    1. 安装git
    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    sudo yum install https://rhel7.iuscommunity.org/ius-release.rpm # redhat执行
    sudo yum install https://centos7.iuscommunity.org/ius-release.rpm # centos执行
    sudo yum provides git 
    #获取git版本,如果提示[Errno 14] Peer cert cannot be verified or peer cert invalid错误, vim /etc/yum.conf → 添加或修改如下选项[sslverify=false]
    sudo yum install git版本
    git --version #查看git版本
    

    可参考:

    1. 总结
      至此,git 2.16 安装完毕。
    • PS:版本号镇楼


      版本号

    相关文章

      网友评论

        本文标题:redhat 7x / centos 7x 安装 git 2.1

        本文链接:https://www.haomeiwen.com/subject/bqatlftx.html