zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    c#正则表达式应用实例
    C# 中堆栈,堆,值类型,引用类型的理解 (摘抄)
    c#用正则表达式获得指定开始和结束字符串中间的一段文本
    asp.net c#截取指定字符串函数
    <收藏>提高Web性能的14条法则(详细版)
    利用Anthem.net 实现前台javascript调用服务器端c#函数 及流程分析
    Anthem.net
    jQuery animate(滑块滑动)
    .NET使用母版页后,控件名称自动生成导致js无法正常操作.net控件的问题
    Cocos2dx跨平台Android环境配置
  • 原文地址:https://www.cnblogs.com/Release-R/p/15135081.html
Copyright © 2011-2022 走看看