CentOS git upgrade case

Source: Internet
Author: User
Tags centos

1. First uninstall CentOS's built-in git1.7.1:

Use git-version to view the version of the system. Cento6.5 should contain the git version 1.7.1.

> # Yum remove git

2. Install the package required for git compilation

> # Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
> # Yum install gcc perl-ExtUtils-MakeMaker

3. Download the latest source code from github

> # Wget https://github.com/git/git/archive/v2.8.2.tar.gz
> # Tar zxvf v2.8.2.tar.gz
> # Cd git-2.8.2

4. Compile and install

> # Cd git-2.8.2
> # Make prefix =/usr/local/git all
> # Make prefix =/usr/local/git install
> # Echo "export PATH = $ PATH:/usr/local/git/bin">/etc/bashrc
> # Source/etc/bashrc

5. View the current version


> # Git -- version
> Git version 2.8.2

Related Article

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.