51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

CentOS6.9完整编译安装git

参考文档:

https://git-scm.com/book/zh/v2/起步-安装-Git

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

|---|----------------| | 1 | yum remove git |

2、安装所需依赖
yum install epel-release yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc docbook2X xmlto wget

|-----|-----------------------------------------------------------------------------------------------------------------------------| | 1 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

|---|-----------------------------------------------------------| | 1 | 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

|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 | 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 |

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

|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 | 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版本


赞(0)
未经允许不得转载:工具盒子 » CentOS6.9完整编译安装git