CentOS6.7 install the latest git

Source: Internet
Author: User

CentOS6.7 install the latest git
1. Install the compiling environment

# yum -y install gcc zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl perl-ExtUtils-MakeMaker asciidoc xmlto
2. download the latest git package

Git latest package: http://codemonkey.org.uk/projects/git-snapshots/git/

Run the following command to download the latest git package:

# wget -c http://codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.xz
3. decompress the git package
# xz -d git-latest.tar.xz# tar -xvf git-latest.tar
4. Compile and install git
# Cd git-2016-05-24 # autoconf #./configure # make & make install (or make-jn & make-jn install)

Here, n in make-jn is the specified number of threads. For multi-core processors, this can speed up compilation and installation.

5. Create a git soft link
# ln -s /usr/local/bin/git /usr/bin/

Because the original centos comes with git,/usr/bin/git already exists. Delete it and recreate it as follows:

# rm -fr /usr/bin/git# ln -s /usr/local/bin/git /usr/bin/
6. Check the version number.
# git --versiongit version 2.9.0-rc0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.