centos6 编译升级git

目标

在centos6上编译安装新版的git

过程

参考:https://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x
具体过程如下:

Step 1: Install Required Packages
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

Step 2: Uninstall old Git RPM
# yum remove git

Step 3: Download and Compile Git Source
cd /home/word/download
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
tar xzf git-2.11.0.tar.gz
cd git-2.11.0

./configure --prefix=/usr/local/
make
make install

echo 'export PATH=/usr/local/git/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
$ git --version
git version 2.11.0

你可能感兴趣的:(centos6 编译升级git)