歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS下安裝Git

CentOS下安裝Git

日期:2017/2/28 14:26:13   编辑:Linux教程

CentOS下安裝Git

1.解壓git-master.zip到/opt/git-master

2.打開$IGIT_HOME/INSTALL文件

裡邊有這幾句

$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root

3.按照上邊的來

make all doc 時

插曲1

/bin/sh: line 1: asciidoc: command not found
make[1]: *** [git-add.html] Error 127
make[1]: Leaving directory `/opt/git-master/Documentation'
make: *** [doc] Error 2

缺asciidoc 三部曲安裝asciidoc-8.6.9.tar.gz

繼續make all doc

插曲2

XSLTPROC user-manual.html
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl:1: parser error : Document is empty

^
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl:1: parser error : Start tag expected, '<' not found

^
compilation error: file docbook.xsl line 3 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
make[1]: *** [user-manual.html] Error 5
make[1]: Leaving directory `/opt/git-master/Documentation'
make: *** [doc] Error 2

XSLTPROC user-manual.html時報錯

只要一大寫 瞬間啥都不認識了

按照慣例

yum search XSLTPROC

[root@bogon git-master]# yum search XSLTPROC
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.163.com
============================== Matched: XSLTPROC ===============================
libxslt.i386 : Library providing the Gnome XSLT engine
libxslt.x86_64 : Library providing the Gnome XSLT engine

真有這個東西 還挺熟悉 果斷安裝

4.make install install-html 安裝

install-doc我想了想沒裝 前邊好像白編譯了

可以直接 make all

5.終端

git --version

Linux git命令參數及用法詳解 http://www.linuxidc.com/Linux/2012-01/51205.htm

Fedora通過Http Proxy下載Git http://www.linuxidc.com/Linux/2009-12/23170.htm

在Ubuntu Server上安裝Git http://www.linuxidc.com/Linux/2009-06/20421.htm

服務器端Git倉庫的創建(Ubuntu) http://www.linuxidc.com/Linux/2011-02/32542.htm

Linux下Git簡單使用教程(以Android為例) http://www.linuxidc.com/Linux/2010-11/29883.htm

Git權威指南 PDF高清中文版 http://www.linuxidc.com/Linux/2013-10/91053.htm

Git 的詳細介紹:請點這裡
Git 的下載地址:請點這裡

更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14

Copyright © Linux教程網 All Rights Reserved