• Centos7中安装Git


    一、安装git

    yum install git

    1、查看yum源仓库Git信息

    yum info git

    2、安装依赖库

    yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel 
    yum install gcc-c++ perl-ExtUtils-MakeMaker

    3、如果原有的git版本过低,移除默认安装的旧版git

    git --version
    yum remove git ## 移除原来的版本

    4、下载安装

    cd /usr/src
    wget https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz

    5、解压文件

    tar xf git-2.18.0.tar.gz

    6、配置编译安装

    [root@wugenqiang ~]# cd /usr/src
    [root@wugenqiang src]# ls
    debug  git-2.18.0  kernels
    [root@wugenqiang src]# cd git-2.18.0/
    [root@wugenqiang git-2.18.0]# 
    [root@wugenqiang git-2.18.0]# make configure
    [root@wugenqiang git-2.18.0]# ./configure --prefix=/usr/git ##配置目录
    [root@wugenqiang git-2.18.0]# make profix=/usr/git
    [root@wugenqiang git-2.18.0]# make install

    7、加入环境变量

    echo "export PATH=$PATH:/usr/git/bin" >> /etc/profile

    8、刷新环境变量

    source /etc/profile

    9、检查版本

    git --version

     当出现以上图片样式就说明安装成功!

  • 相关阅读:
    iperf/iperf3网络测试工具的安装与使用
    驱动模块(4)——模块编译
    760. Find Anagram Mappings
    MySQL面试题
    MySQL 的数据存储引擎
    203. Remove Linked List Elements
    数据库事务隔离级别
    232. Implement Queue using Stacks
    MySQL中的事务
    482. License Key Formatting
  • 原文地址:https://www.cnblogs.com/songbao/p/12532113.html
Copyright © 2020-2023  润新知