CentOS6.x 源碼編譯安裝Git

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.