Install the latest git2.11 version on centos

Source: Internet
Author: User

Install the latest git2.11 version on centos

The procedure is as follows:

1. Download the compilation tool

Yumgroupinstall "DevelopmentTools"

2. Download the dependency package

Yuminstallzlib-develperl-ExtUtils-MakeMakerasciidocxmltoopenssl-devel

3. Download the source code of the latest version of Git.

Wgethttp: // www.codemonkey.org. uk/projects/git-snapshots/GitHub/git-latest.tar.gz

Or

Wgethttp: // www.codemonkey.org. uk/projects/git-snapshots/git/git-latest.tar.xz (I used this successfully)

4. Extract the source file

Tar-zxvfgit-latest.tar.gz

Or

Xz-dgit-latest.tar.xz

Tar-xvfgit-latest.tar (I used this to succeed)

5. Compile and install

Autoconf

./Configure

Make-jn & make-jninstall (I used make & successfully)

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

6. Add link

Ln-s/usr/local/bin/git/usr/bin/

This step is very important for systems with old git versions in the original system. It will be reported that the Link already exists. In this case, delete the original Link, namely/usr/bin/git, and then execute Step 6.

7. Check the version number

Git -- version

If the old version of git exists in the system, after the new git is installed, it is still displayed as the old version after git -- version is used, because I ignores step 6, which is very important!

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.