CentOS updates git

Source: Internet
Author: User
Centos6.5 is installed with git1.7.X by default. There may be some strange problems during use, and it is not very friendly for user names and passwords. Update git on Centos6.5 to 2.0.5. the method is as follows: 1. install the package required for git compilation # yuminstallcurl-develexpat-develgettext-developenssl-develzlib-de

Centos 6.5 is installed with git 1.7.X by default, which has some strange problems during use and is not very friendly for user names and passwords.
Update git on Centos6.5 to 2.0.5 using the following method:

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

2. delete existing git

# Yum remove git

3. download git source code

# Cd/usr/src
# Wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
# Tar xzf git-2.0.5.tar.gz

4. Compile and install

# Cd git-2.0.5
# 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. check the version number.

# Git-version

Git version 2.0.5

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.