2019独角兽企业重金招聘Python工程师标准>>>

由于centos中的源仓库中git不是最新版本,需要进行源码安装。

1、查看yum仓库git信息

[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum info git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name        : git
Arch        : x86_64
Version     : 1.8.3.1
Release     : 13.el7
Size        : 22 M
Repo        : installed
From repo   : base
Summary     : Fast Version Control System
URL         : http://git-scm.com/
License     : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an: unusually rich command set that provides both high-level operations: and full access to internals.: : The git rpm installs the core tools with minimal dependencies.  To: install all git packages, including tools for integrating with other: SCMs, install the git-all meta-package.

2、依赖仓库安装

[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum install  gcc perl-ExtUtils-MakeMaker

3、卸载已安装的git

[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum remove git

4、下载git最新源码

下载地址:https://github.com/git/git/releases

wget https://github.com/git/git/archive/v2.17.1.tar.gz

5、安装

解压、安装

[root@iZm5e3d4r5i5ml889vh6esZ git]# tar zxvf v2.17.1.tar.gz
[root@iZm5e3d4r5i5ml889vh6esZ git]# cd git-2.17.1/
[root@iZm5e3d4r5i5ml889vh6esZ git]# make prefix=/usr/local/git all
[root@iZm5e3d4r5i5ml889vh6esZ git]# make prefix=/usr/local/git install

6、添加到环境变量

[root@iZm5e3d4r5i5ml889vh6esZ git]# vim /etc/profile
export GIT_HOME=/usr/local/gitexport PATH=$GIT_HOME/bin:$PATH
[root@iZm5e3d4r5i5ml889vh6esZ git]# source /etc/profile

7、查看当前版本号

[root@iZm5e3d4r5i5ml889vh6esZ git]# git --version
git version 2.17.1

转载于:https://my.oschina.net/u/182501/blog/1832687

centos7 git安装相关推荐

  1. Centos7 Git源码安装

    Git简介 有关于git的详细介绍和使用这里就不多说了,有兴趣看的话可以访问上一篇文章文章yum安装git 实验环境 系统版本:centos7x3.10.0-514.el7.x86_64 Git版本: ...

  2. Centos7 编译安装git 报错 git-compat-util.h:14:2: error

    Centos7 编译安装git 报错 git-compat-util.h:14:2: error 环境: OS:CentOS7.9 Git版本: git-2.38.1 一.报错现象 [root@077 ...

  3. centos7 wget 安装git

    1.安装git依赖包 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUti ...

  4. Centos7下安装Docker

    Centos7下安装Docker(详细的新手装逼教程) 参考: https://www.cnblogs.com/qgc1995/archive/2018/08/29/9553572.html 早就听说 ...

  5. 查看git安装目录_一、Linux和Windows下安装Git

    centos7中安装Git 简单粗暴版 查看是否安装了git git --version #查看git版本信息 如果提示未找到命令,则表示没有安装 如果安装了git,但是版本过低,则使用该命令移除原来 ...

  6. centos7 sh 注释_在CentOS7上安装RocketMQ 4.7.1

    前言 阿里的fastjson的低版本(<=1.2.68)被爆出有安全漏洞,而RocketMQ 4.7.0使用了fastjson 1.2.62,因此需要将RocketMQ升级到 RocketMQ ...

  7. centos7 如何安装部署k8s_架构运维篇(五):Centos7/Linux中安装部署RocketMQ

    上一篇 架构运维篇(四):Centos7/Linux中Tomcat安装SSL证书实践 这一篇讲一下在Centos7/Linux安装RocketMQ,MQ的具体应用场景和使用就不再啰嗦了.我在没有使用过 ...

  8. centos7.5安装snipe-it v5.1.2版本开源资产管理软件

    CentOS Linux release 7.5.1804 (Core)+ Apache/2.4.6 (CentOS)+php7.2.8+ 5.5.68-MariaDB+snipeit5.1.2这是我 ...

  9. CentOS-7部署安装Zabbix 3.0

    文章目录 **实验目的:** 部署安装Zabbix 3.0: 配置"主机名和hosts解析" 安装MySQL(CentOS-7中更名为 mariadb ) 使用官方yum源安装Za ...

最新文章

  1. 论文阅读:FFDNet:Toward a Fast and Flexible Solution for CNN based Image Denoising
  2. 架设HmailServer邮件服务器以及webmail
  3. python新式类和经典类的区别?
  4. jquery.ui.draggable中文文档jquery 自由拖拽类~study~
  5. 微型计算机接口部件的结构,微机接口课后习题解析.doc
  6. 中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云-订阅主题)
  7. C Tricks(十)—— str2int vs int2str
  8. 加上mvc:resources后controller访问404
  9. kali 安装sogou输入法(kali 版本介于16.1-18.2)
  10. Java springboot B2B2C o2o多用户商城 springcloud架构-(十)高可用的服务注册中心
  11. postgresal去重_postgresql数据库去重方法
  12. matlab各相关系数的计算,matlab 相关系数的计算
  13. 程序员凌晨闲暇无聊时干什么
  14. 双系统时间不一致解决方案
  15. 语言学及应用语言学类毕业论文文献有哪些?
  16. 算法学习之排序(1)--插入排序
  17. 腾讯招聘总监:腾讯内推的思考与实践|好文推荐
  18. 杜兰特全部比赛录像合集【百度网盘高清分享】
  19. 【分享】Xmind会默认安装在C盘,如何将Xmind安装在指定文件夹
  20. 【大揭秘】Android架构组件ViewModel来龙去脉

热门文章

  1. ros_openvino_toolkit环境搭建纪实
  2. [BUUCTF-pwn]——bjdctf_2020_babyrop2
  3. cad2017怎么改变选择方式_CAD编辑对象选择的方法有哪些
  4. 关于优酷开放SDK之setOnVideoSizeChangedListener
  5. c语言迭代法求平方根_求平方根问题 (C++ 实现)
  6. cacti linux 模板,Cacti模板
  7. linux下安装树梅派系统,优麒麟树莓派系统(优麒麟 for Raspberry Pi)的安装方法...
  8. python人脸对比相似度_python人脸对比
  9. Jquery有哪些选择器
  10. access violation at address in module Read of address