歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

CentOS6.x 源碼編譯安裝Git

CentOS6.x 源碼編譯安裝Git

CentOS6.x 源碼編譯安裝Git


CentOS自帶的Git版本比較老,經常不能滿足功能需要。

最新的版本只能源碼安裝。記錄下,以免忘記:


0) 安裝epel源

32位系統選擇:
rpm -ivhhttp://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivhhttp://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

64位系統選擇:
rpm -ivhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivhhttp://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

導入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5

別忘了安裝
yum install yum-priorities

1) 安裝依賴

[plain]view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. sudoyuminstallcurl-develexpat-develgettext-developenssl-develzlib-devel
  2. sudoyuminstallopenssl-develgettextasciidocxmltodocbook2x
  3. ln-s/usr/bin/db2x_docbook2texi/usr/bin/docbook2x-texi

2) 源碼編譯安裝git

[plain]view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. gitclonehttps://github.com/git/git
  2. cdgit
  3. makeconfigure
  4. ./configure--prefix=/usr(或者./configure--prefix=/usr--with-curl--with-expat)
  5. makealldoc
  6. makeinstallinstall-docinstall-html

http://xxxxxx/Linuxjc/1184802.html TechArticle

Copyright © Linux教程網 All Rights Reserved