美文网首页
linux下安装git

linux下安装git

作者: 3bd3c1497272 | 来源:发表于2020-05-08 14:08 被阅读0次

    linux为centos
    1.下载git 包
    wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
    2.减压包
    tar -zxf git-2.9.5.tar.gz
    3.下载git依赖 通过yum来安装
    yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
    4.git根目录下执行
    ./configure --prefix=/usr/local/git
    5.编译和安装
    make && make install
    6.配置环境变量
    vim /etc/profile

    GIT_HOME

    GIT_HOME=/usr/local/git
    export PATH=PATH:GIT_HOME/bin

    刷新

    source /etc/profile

    相关文章

      网友评论

          本文标题:linux下安装git

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