For XXFor XX

作为一个高手
我习惯了孤独

Linux Centos7.4 编译安装最新版Git

Linux Centos7.4 编译安装最新版Git

BlueShark_EN-AU12265881842_1920x1080.jpg

1. 安装基础库

yum install gcc gcc-c++ curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker autoconf -y

2. 去github下载源码安装包

https://github.com/git/git/releases

我这里以最新版v2.18.0为例

wget https://github.com/git/git/archive/v2.18.0.tar.gz
tar -zxvf v2.18.0.tar.gz

3. 编译安装

cd git-2.18.0
make configure
./configure --prefix=/usr/local/git
make && make install

4. 配置全局路径

export PATH="/usr/local/git/bin:$PATH"
source /etc/profile

5. 查看版本

git --version

QQ浏览器截图20180731220803.png

转载请注明出处:For XX » Linux Centos7.4 编译安装最新版Git
标签:linux git
分享到: 更多