CentOS6.x source code compilation and installation of Git
The Git version of CentOS is relatively old and often cannot meet the functional requirements.
The latest version can only be installed by source code. Record to avoid forgetting:
0) install the epel Source
32-bit System Selection:
Rpm-ivhhttp: // dl.fedoraproject.org/pub/epel/6/ I #/epel-release-6-8.noarch.rpm
Rpm-ivhhttp: // dl.fedoraproject.org/pub/epel/5/ I #/epel-release-5-4.noarch.rpm
64-bit System Selection:
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
Import key:
Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5
Do not forget to install
Yum install yum-priorities
1) install Dependencies
[Plain] view plaincopy
- Sudoyuminstallcurl-develexpat-develgettext-developenssl-develzlib-devel
- Sudoyuminstallopenssl-develgettextasciidocxmltodocbook2x
- Ln-s/usr/bin/db2x_docbook2texi/usr/bin/docbook2x-texi
2) Compile and install git with source code
[Plain] view plaincopy
- Gitclonehttps: // github.com/git/git
- Cdgit
- Makeconfigure
- ./Configure -- prefix =/usr (or./configure -- prefix =/usr -- with-curl -- with-expat)
- Makealldoc
- Makeinstallinstall-docinstall-html