标签:安装git 依赖库 最新 bin 环境 url path $path 变量
3、卸载低版本git
# yum remove git
1
4、依赖库安装
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install gcc perl-ExtUtils-MakeMaker
1
2
5、下载最新版git
# wget https://github.com/git/git/archive/v2.9.2.tar.gz
1
6、解压到相应的目录
# tar zxf git-2.9.2.tar.gz ..
1
7、安装git
# cd git-2.9.2
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
1
2
3
8、添加到环境变量
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
1
2
9、查看版本号
# git --version
git version 2.9.2
标签:安装git 依赖库 最新 bin 环境 url path $path 变量
原文地址:https://www.cnblogs.com/666gang/p/13252669.html