linux源码编译安装git

1. 下载编译工具
[root@node01 git-2.13.3]##yum -y groupinstall "Development Tools"
2. 下载依赖包
[root@node01 git-2.13.3]##yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
3. 下载 Git 最新版本的源代码
[root@node01 git-2.13.3]##wget https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.gz --no-check-certificate
4. 解压
[root@node01 git-2.13.3]##tar -zxvf git-2.13.3.tar.gz
5. 进入目录配置
[root@node01 git-2.13.3]##cd git-2.13.3
[root@node01 git-2.13.3]##./configure --prefix=/usr/local/git
6. 安装
make && make install
7. 配置全局路径

[root@node01 git-2.13.3]##vi /etc/profile
export PATH="/usr/local/git/bin:$PATH"
[root@node01 git-2.13.3]##source /etc/profile
8. 查看git版本
[root@node01 git-2.13.3]# git --version
git version 2.13.3

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值