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