[root@192 opt]# wget https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz

解压

[root@192 opt]# tar zxvf git-2.18.0.tar.gz

make configure

[root@192 opt]# cd git-2.18.0
[root@192 git-2.18.0]# make configure
[root@192 git-2.18.0]# ./configure --prefix=/usr/git
[root@192 git-2.18.0]# make profix=/usr/git
[root@192 git-2.18.0]# make install

编辑/etc/profile文件,加入环境变量配置

export PATH=$PATH:/usr/git/bin

输入source /etc/profile,使之立即生效

测试

[root@192 opt]# git --version
git version 2.18.0

相关文章:

  • 2022-02-23
  • 2021-12-03
  • 2021-10-24
  • 2021-06-16
  • 2021-08-26
  • 2021-10-08
  • 2021-07-07
猜你喜欢
  • 2021-10-15
  • 2021-07-23
  • 2021-12-12
  • 2021-12-30
  • 2021-08-31
  • 2021-12-23
  • 2021-11-28
相关资源
相似解决方案