Linux下GIT安装
1. 下载git源码
链接:https://pan.baidu.com/s/11jXoMh06_-kUlAIpohZh0g
提取码:9gwk
2. 解压源码
tar -zxvf git-2.32.0.tar.gz
3. 下载编译依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
4. 进入解压后的目录(如果已有git需要卸载 yum -y remove git)
5. 编译git
make prefix=/usr/local/software/git all
6. 安装git
make prefix=/usr/local/software/git install
7. git环境变量配置
echo “export PATH=$PATH:/usr/local/software/git/bin” > /etc/profile.d/git.sh
source /etc/profile.d/git.sh
git --version