Centos 6.5默认安装的是git 1.7.X 版本,使用过程中会有一些奇怪的问题,对于用户名、密码支持不是很友好。
将Centos6.5上的git更新到2.12.0,方法如下:
1.安装编译git时需要的包
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install gcc perl-ExtUtils-MakeMaker
2.删除已有的git
# yum remove git
3.下载git源码
# wget https://www.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz
# tar xzf git-2.12.0.tar.gz
4.编译安装
# cd git-2.12.0
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
5.检查一下版本号
# git --version
将Centos6.5上的git更新到2.12.0,方法如下:
1.安装编译git时需要的包
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install
2.删除已有的git
# yum remove git
3.下载git源码
# wget https://www.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz
# tar xzf git-2.12.0.tar.gz
4.编译安装
# cd git-2.12.0
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
5.检查一下版本号
# git --version