Centos upgrade git to advanced version

Source: Internet
Author: User

Centos upgrade git to advanced version

To use github, git is installed with version 1.7.1. I think this version is a little old for me. Because all git versions are up to 2.2. So I decided to upgrade to the latest version. Please check the three or four sections to avoid detours.

1. Uninstall the old version of git first.

# Yum remove-y git

Ii. Install the new version of git

1、#wget2、#tarxfv2.2.1.tar.gz3、#cdgit-2.2.14、#makeconfigure5、#./configure--prefix=/usr/local/git--with-iconv=/usr/local/libiconv6、#makealldoc7、#makeinstallinstall-docinstall-html8、#echo"exportPATH=$PATH:/usr/local/git/bin">>/etc/bashrc>#source/etc/bashrc

Iii. Installation errors

1. error: MSGFMT po/de. msg make [1]: *** [po/de. msg] Error 127

Solution: yum install tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel

2. errro: asciidoc: command not found
Solution: yum install-y asciidoc

3. errro: xmlto: command not found

Solution: yum install-y xmlto

Iv. Detection

After the installation is complete, because it is not in the system path, perform the write Path 2 and 8 operations.

# Git -- version

# Git version 2.2.1
Finally, we recommend that you install the dependency once when upgrading and installing git.

Yum install-y tk zlib-devel openssl-devel perl cpio expat-devel gettext-develasciidocxmlto

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.