• Centos7 从 git version 1.8.3.1升级git version 2.32.0 全过程


    安装安装依赖软件

    [root@localhost ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirrors.163.com

    ================================================
    ============省略一大堆不需要操作的过程=============
    ================================================

    Installed:
    gettext-devel.x86_64 0:0.19.8.1-3.el7

    Complete!
    [root@localhost ~]# yum install gcc perl-ExtUtils-MakeMaker
    ================================================
    ============省略一大堆不需要操作的过程=============
    ================================================

    卸载之前安装的版本


    [root@localhost ~]# git --version
    git version 1.8.3.1
    [root@localhost ~]# yum remove git
    Loaded plugins: fastestmirror
    Resolving Dependencies
    ================================================
    ============省略一大堆不需要操作的过程=============
    ================================================

    下载软件


    [root@localhost ~]# cd /usr/local/src/
    [root@localhost src]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.32.0.tar.xz
    --2021-08-12 09:37:01-- https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.32.0.tar.xz
    Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.95.133, 2604:1380:3000:1500::1
    Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.95.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 6551348 (6.2M) [application/x-xz]
    Saving to: ‘git-2.32.0.tar.xz’

    100%[===========================================================================================>] 6,551,348 55.4KB/s in 1m 46s

    2021-08-12 09:38:49 (60.3 KB/s) - ‘git-2.32.0.tar.xz’ saved [6551348/6551348]
    [root@localhost src]# ls
    git-2.32.0.tar.xz
    [root@localhost src]# tar -xf git-2.32.0.tar.xz
    [root@localhost src]# cd git-2.32.0/
    [root@localhost git-2.32.0]# make prefix=/usr/local/git all
    [root@localhost git-2.32.0]# make prefix=/usr/local/git install
    [root@localhost git-2.32.0]# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
    [root@localhost git-2.32.0]# source /etc/profile
    [root@localhost git-2.32.0]# git --version
    git version 2.32.0

    如果只是希望当前账户使用该版本则做如下操作


    [root@localhost git-2.32.0]# echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bashrc
    [root@localhost git-2.32.0]# source ~/.bashrc
    [root@localhost git-2.32.0]# git --version
    git version 2.32.0

  • 相关阅读:
    Django环境配置
    python pip使用报错: Fatal error in launcher: Unable to create process using '"c:python27python.exe" "C:Python27Scriptspip.exe" '
    我的第100篇博客
    测试代码(测试函数)
    python 存储数据
    python 异常之进阶操作
    从实战的角度谈微服务(三):基于Feign的熔断
    从实战的角度谈微服务(三):基于Feign服务间的调用
    从实战的角度谈微服务(二):服务注册与发现(Eureka服务端)
    从实战的角度谈微服务(一):初识微服务
  • 原文地址:https://www.cnblogs.com/Release-R/p/15135081.html
Copyright © 2020-2023  润新知