到 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. nginx 配置 强制访问https

    使用nginx的301状态码 server { listen ;     if ($scheme = 'http') {    return 301 https://$server_name$requ ...

  2. 入门移动端混合开发 实战京东 APP(完整更新)

    课程资料获取链接:点击这里 混合开发入门 主流开发方案实战京东移动端APP 无需原生开发基础,也能完美呈现京东商城.本课程融合vue.Android.IOS等目前流行的前端和移动端技术,混合开发经典电 ...

  3. 深入浅出Mybatis系列三-配置详解之properties与environments(mybatis源码篇)

    注:本文转载自南轲梦 注:博主 Chloneda:个人博客 | 博客园 | Github | Gitee | 知乎 上篇文章<深入浅出Mybatis系列(二)---配置简介(mybatis源码篇 ...

  4. .NetCore学习笔记:一、UnitOfWork工作单元

    Maintains a list of objects affected by a business transaction and coordinates the writing out of ch ...

  5. [shell脚本] mysql服务启动脚本

    服务启动脚本(初始化.启动.登录) #!/bin/bash export PID=/usr/local/nestdb_master/bin/mysqld export PASSWORD=123456 ...

  6. Nginx proxy_set_header 配置注意事项

    转载自:https://www.jianshu.com/p/fd16b3d10752 如果没有特别注意 proxy_set_header 配置,使用 proxy_set_header 可能会引起以下问 ...

  7. C++类this指针为空时的几个误区

    代码: class test{ public: static void f1(){cout<<y<<endl;} void f2(){cout<<y<< ...

  8. spring 切点表达式

    spring切点表达式: 1.*通配符:该通配符主要用于匹配单个单词. 例如:execution(* com.bonnie.Controller.TestController.*()) 上述表达式表示 ...

  9. cc.progressFromTo cc.progressTo(action 在duration中ProgressTimer的Percentage变化)

    let progressTimer= new cc.ProgressTimer(new cc.Sprite(fileName));this.addChild(progressTimer);progre ...

  10. 回顾 Monty Hall (三门问题)

    一.问题描述 Monty Hall Problem 源于美国的一档电视节目<Let's Make a Deal>,其中Monty Hall 是这个节目的主持人. 节目中有三扇门1.2.3, ...