1.移除旧版本git
[root@Git ~]# git --version ## 查看自带的版本git version 1.8.3.1
[root@Git ~]# yum remove git ## 移除原来的版本 2.安装所需软件包
[root@Git ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
[root@Git ~]# yum install gcc-c++ perl-ExtUtils-MakeMaker
3.下载&安装
[root@Git ~]# cd /usr/src
[root@Git ~]# wget https://www.kernel.org/pub/software/scm/git/git-2.19.0.tar.gz
4.解压
[root@Git ~]# tar xf git-2.19.0.tar.gz
5.配置编译安装
[root@Git ~]# cd git-2.19.0
[root@Git ~]# make configure
[root@Git ~]# ./configure --prefix=/usr/git ##配置目录
[root@Git ~]# make profix=/usr/git
[root@Git ~]# make install
6. 加入环境变量
[root@Git ~]# echo "export PATH=$PATH:/usr/git/bin" >> /etc/profile
[root@Git ~]# source /etc/profile
7.检查版本
[root@Git git-2.19.0]# git --version
git version 2.19.0

linux下通过源码安装git的更多相关文章

  1. Centos7 linux下通过源码安装redis以及使用

    下载redis安装包 wget http://download.redis.io/releases/redis-5.0.3.tar.gz 解压压缩包 tar -zxvf redis-.tar.gz y ...

  2. Linux下通过源码编译安装程序

    本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...

  3. Linux下通过源码编译安装程序(configure/make/make install的作用,然后在/etc/profile文件里修改PATH环境变量)

    一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件:就是通常我们见到的lib目录下的文件 配置文件:这个不必多说,都知道 帮助文档:通常是我们在 ...

  4. 【Git】CentOS7 通过源码安装Git

    yum源仓库里的Git版本更新不及时,最新版的Git是1.8.3,但是官方的最新版早已经更新到2.9.5.想要安装最新版本Git,只能下载源码进行安装 建议最好更新git为较新版本,便于使用 1.查看 ...

  5. 在CentOS7(虚拟机)下通过源码安装Postgresql10以及基本配置

    操作系统:CentOS7 安装文件:postgresql-10.0.tar.gz 系统环境:gcc.Python 1:源码安装 [postgres@localhost ~]# tar zxvf pos ...

  6. 通过源码安装PostgresSQL

    通过源码安装PostgresSQL 1.1 下载源码包环境: Centos6.8 64位 yum -y install bison flex readline-devel zlib-devel yum ...

  7. 在centos6.7通过源码安装python3.6.7报错“zipimport.ZipImportError: can't decompress data; zlib not available”

    在centos6.7通过源码安装python3.6.7报错: zipimport.ZipImportError: can't decompress data; zlib not available 从 ...

  8. linux下python3源码安装及卸载

    Linux下Python3的源码编译安装和卸载方法 [日期:2019-06-21] 来源:博客园  作者:wuli潇萧 [字体:大 中 小]     (一)Linux下软件的源码编译安装和卸载方法 L ...

  9. 通过源码安装最新版Git

    下载源码 到Git的Github主页上下载最新的源码到本地,解压并进入目录. 编译安装 cd 你的git源码目录 autoconf ./configure make 第一个报错 报错内容: usr/b ...

随机推荐

  1. nginx安装及优化

    1.pcre及nginx安装包下载 wget http://www.pcre.org/   pcre用yum安装即可 http://nginx.org/en/download.html 2.安装 -安 ...

  2. 虚拟机中Linux设置当前ip

    1.查看当前IP,查看网卡信息 ifconfig 2.设置临时IP ifconfig eth0 192.168.1.163 netmask 255.255.255.0 eth0表示第一块网卡 设置完之 ...

  3. [转]jQuery Validate使用说明

    本文转自:http://www.cnblogs.com/gimin/p/4757064.html jQuery Validate 导入 js 库 <script src="./jque ...

  4. Java根据byte数组,生成文件

    原文出自:https://blog.csdn.net/seesun2012 根据byte数组,生成文件 自己写的小案例,找个地方记录一下 package com.seesun2012.utils; i ...

  5. 上传文件插件-bootstrap-fileinput

    1. js文件: <link href="/bootstrap/css/fileinput.css" media="all" rel="styl ...

  6. jdbc封装DBUtil

    1.编写实体类User public class User { private Integer id; private String username; private Integer age; pr ...

  7. openlayers 聚合效果

    //cyd var cydclusterSource = new ol.source.Cluster({ distance: 40, source: new ol.source.Vector({ fe ...

  8. 详解WebApp与Native App的区别

    一篇真的很棒关于html5的Web App与Native App的技术分析 ! 自Iphone和Android这两个牛逼的手机操作系统发布以来,在互联网界从此就多了一个新的名词-WebApp(意为基于 ...

  9. css display:table圣杯布局

    圣杯布局指的是一个网页由页眉,3等高列(2个固定侧栏和中心内容主体)和贴在页面底部的页脚组成. 主要思路是对整个容器使用地上diaplay:table 的css规则,然后分别对页眉页脚使用displa ...

  10. webstrom 在脚本区域写其他语言得到语法提示

    webstrom 在脚本区域写其他语言得到语法提示 webstrom 的提示小灯泡 点击inject language or reference 选择相应的语言. 如果写的内容比较多, 可以按照web ...