到 git官网下载git 源码安装包,git官网地址:https://www.git-scm.com/

选择Tarballs系列的安装包,官网git下载:https://mirrors.edge.kernel.org/pub/software/scm/git/

选择最新的tar.gz结尾的安装包

如下安装脚本

vi ./install_git.sh

#!/bin/bash
yum remove git -y
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker -y
cd /usr/local/src/
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
tar zxvf git-2.9..tar.gz
cd git-2.9.
./configure --prefix=/usr/local/git/
make
make install
ln -sf /usr/local/git/bin/git /bin/
ln -sf /usr/local/git/bin/git-upload-pack /bin/
ln -sf /usr/local/git/bin/git-cvsserver /bin/
ln -sf /usr/local/git/bin/gitk /bin/
ln -sf /usr/local/git/bin/git-receive-pack /bin/
ln -sf /usr/local/git/bin/git-shell /bin/
ln -sf /usr/local/git/bin/git-upload-archive /bin/
#echo 'PATH=$PATH:/usr/local/git/bin' >> /etc/profile
#source /etc/profile

:wq保存,之后执行bash ./install_git.sh

 

[root@localhost ~]git --version

git version 2.9.5

 

centos源码安装git最新版的更多相关文章

  1. linux(centos)源码安装git

    最近使用一个开源库,部署的的时候需要用git克隆依赖库.刚好系统没安装git.就尝试了源码安装git. 源码下载地址:http://codemonkey.org.uk/projects/git-sna ...

  2. centos 源码安装git

    (1) 添加rpmforge源 wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686 ...

  3. centos源码安装git

    因为Centos上yum安装的话可能版本比较低,使用中会有一些难以预料的问题出现. 从源代码编译安装方法: #Centos执行: yum install curl-devel expat-devel ...

  4. CentOS源码安装QT

    在VirtualBox上的CentOS下安装qt-everywhere-opensource-src-4.8.4 ,执行 ./confiure时失败,失败信息为:Basic XLib function ...

  5. Centos下源码安装git

    1.centos下git版本太久了,才1.8几,而官方更新的还是很活跃的,于是我就想源码安装一个新版本. 2.首先到: https://github.com/git/git/releases 下载最新 ...

  6. 简单说明CentOS源码安装程序

    第一步.安装依赖包.一般官网会有依赖关系,没有就网上搜索一下. 第二步.下载源码包,上传至CentOS服务器 第三步.解压缩 第四步.进入源码文件夹 第五步.执行./configure,这一步主要是为 ...

  7. CentOS 源码安装MySQL5.7

    一.安装方式源码安装,源码包名称mysql-boost-5.7.27.tar.gz,此版本包含boost库,在解压后的boost路径下.安装时,可以-DDOWNLOAD_BOOST=1 -DWITH_ ...

  8. CentOS源码安装Wireshark

    (2019年2月19日注:这篇文章原先发在自己github那边的博客,时间是2016年8月25日) Wireshark为网络管理员常用的一个网络管理工具,通过使用这个软件,我们可以对本机网卡上的经过的 ...

  9. CentOS源码安装 Tomcat/8.0.24

    依个人的习惯,喜欢将源码安装在/usr/local这个目录下面: 第一步:下载源码 wget http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.2 ...

随机推荐

  1. CF1280E Kirchhoff's Current Loss

    题意 做法 考虑一个子电路图\(G\),设得到有效电阻为\(x\),费用为\(f_G(x)\),通过归纳易得\(f_G(x)\)是关于\(x\)的一个一次函数,即\(f_G(x)=k_Gx\) 考虑电 ...

  2. PAT (Advanced Level) Practice 1054 The Dominant Color (20 分)

    Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of i ...

  3. py 二级习题(turtle)

    用turtle画一个正方形 import turtle turtle.penup() turtle.goto(-100,-100) turtle.pendown() turtle.begin_fill ...

  4. 前后端分离开发,跨域时jsessionid每次请求都变化的问题解决方法

    本解决方法的使用前提是,前端开发使用的是vue,后端使用java(SpringMVC) 在前后端分离开发过程中,可能会出现因跨域而导致每次请求的jsessionid不一致的情况 解决方法: 前端:要在 ...

  5. vjudge Lake Counting 搜索 水池 8方向

    原题链接https://vjudge.net/contest/331118#problem/A 题目: 现在有一个M*N的方阵,每个格子里面是.或者W,点代表水,然后如果在这个点的周围,即8个方向内还 ...

  6. 小I选宾馆

    小 I 选宾馆 Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 小 I 去天津玩啦,一路上,他跟他的同学发生了许多有趣的 ...

  7. linux 安装 setuptools

    wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar ...

  8. QQ群985135948入群密码

    QQ群985135948入群密码:键盘第三排从左往右依次按过去,就是密码 点下面这个键应该可以进群哦!

  9. ueditor使用本地保存,自动恢复上次编辑的内容

    个人博客 地址:http://www.wenhaofan.com/article/20180912212800 ueditor默认开启了自动保存至本地的功能,但是依然需要在初始化的时候额外添加代码该功 ...

  10. JS变量和数据类型及其转化

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...