git 源碼安裝 在centos6.5

  1. 下載源碼包 git-2.9.3.tar.gz 以下兩個地址可供下載:
  1. 從源碼安裝 Git,須要安裝 Git 依賴的庫:html

    2.1 curl、zlib、openssl、expat,還有libiconvgit

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel -ygithub

2.2 爲了可以添加更多格式的文檔(如 doc, html, info),你須要安裝如下的依賴包:

yum install asciidoc xmlto docbook2x -ycurl

  1. 解壓安裝

tar -zxf git-2.9.3.tar.gz
cd git-2.9.3
make configure
./configure --prefix=/usr
make all doc info
make install install-doc install-html install-infoui

4.若是make all doc info 遇到錯誤:/bin/sh: line 1: docbook2x-texi: command not foundurl

yum install docbook2X -y
ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
ln -s /usr/bin/db2x_docbook2man /usr/bin/docbook2x-man.net

參考資料:unix

相關文章
相關標籤/搜索