git 2.2.1 安装流程 centos6.10

以下内容参考

https://blog.whsir.com/post-1743.html

 

1、确认当前没有装过git的rpm包(如有则卸载)

查看当前git版本

   git --version 

卸载当前的低版本

   yum remove git

2、安装所需依赖

yum install epel-release

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc docbook2X xmlto wget


3、这里需要做一个软连接,不然后续安装时会报/bin/sh: line 1: docbook2x-texi: command not found错误

ln -sv /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi


4、安装asciidoc

cd /usr/local/src

wget https://managedway.dl.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz

tar zxf asciidoc-8.6.9.tar.gz

cd asciidoc-8.6.9

./configure

make install


Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/若出现以下错误

可能要安装的依赖

  yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

5、下载git

git可以在https://github.com/git/git/releases下载
也可以在https://www.kernel.org/pub/software/scm/git下载

cd /usr/local/src

wget https://www.kernel.org/pub/software/scm/git/git-2.13.4.tar.gz

tar zxf git-2.13.4.tar.gz

cd git-2.13.4

make configure

./configure --prefix=/usr

make all doc info

make install install-doc install-html install-info


6、编译完成后,看下当前git版本

git --version

你可能感兴趣的:(git)