Centos7 git Latest Version installation

Source: Internet
Author: User

Just re-installed the Centos7 minimum version of the system, found no git, had to reinstall, recorded in case forget.

There are two methods of installation:

A. Yum Command installation:

sudo yum install-y git

This method is simple and will automatically install dependent packages, and will install the latest version from the source (though not necessarily the latest git).

Second, the source code installation:

1. Because the minimum version of CentOS is installed, manually install the dependent package before installation

Yum Install-y gcc-c++-y zlib-devel perl-extutils-makemaker

2. Go to the official website to download the latest version of the GIT source package, my current version is git-2.19.0

wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.0.tar.gz

3. The next step is to unzip, configure, install the

TAR-XVF git-2.19. 0 . TAR.GZCD git-2.19. 0 . /configure--prefix=/usr/local/git makemake install

4. Good luck, no error. If the error is generally dependent on the package is missing, the installation is good, if it is another problem, please Google bar. Next, you can create a hard link to use git in any path.

Cd/usr/local/bin
sudo ln. /git/bin/git git

5. If you go to this step correctly, you can view the GIT version with the following command

[[email protected] ~]$ git--2.19. 0

The installation is complete and can be used under any path!

Centos7 git Latest Version installation

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.