赞
踩
1:下载git
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.30.1.tar.gz
2:解压
tar -zxvf git-2.30.1.tar.gz
3:进入文件夹
cd git-2.30.1
4:安装所需依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
5:编译
make prefix=/usr/local/git all
6:安装
make prefix=/usr/local/git install
7:修改环境变量
vi /etc/profile
export PATH=$PATH:/usr/local/git/bin
source /etc/profile
8:检查
git --version
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。