CentOS的yum源中没有git,只能自己编译安装,现在记录下编译安装的内容,留给自己备忘。
确保已安装了依赖的包
yum install curl
yum install curl-devel
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel
yum install autoconf
下载git包
wget https://www.kernel.org/pub/software/scm/git/git-2.0.1.tar.gz
tar xzvf git-latest.tar.gz
cd git-2.0.1
autoconf
./configure
make && make install
编译完成后查看一下git的版本
git --version
输出
git version 2.0.1 OK了,大功告成~~