换了个服务器,重新装了个git,借此记录一下安装过程
1.首先就是 你要有个linux系统,这里我使用的是Centos,linux相关可自行百度
2.官网下载Git安装包 https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
这里我将安装包放在 /APP/GIT 下
[root@iz2ze4cui3m42v4pj8iqzoz GIT]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
--2020-04-25 13:15:38-- https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.95.133, 2604:1380:3000:1500::1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.95.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6234127 (5.9M) [application/x-gzip]
Saving to: ‘git-2.11.0.tar.gz’
91% [====================================================> ] 5,725,807 58.1KB/s eta 10s
3.解压 并进入tar -xzvf git-2.11.0.tar.gz #解压
cd git git-2.11.0 #解压后进入
4. 安装各种依赖
5.编译并安装make prefix=/usr/local/git all doc #编译,此处需耐心等待一会
make prefix=/usr/local/git install #安装
6.到这里就安装完毕了
7.检验一下 查看git版本号
[root@iz2ze4cui3m42v4pj8iqzoz git-2.11.0] git --version git version 2.11.0