Originally Yum is normal:
Yum Install git
This can be done, but has been an error, it is probably meant to try to connect a few URLs, the connection failed, so you want to manually download the installation package method,
So first:
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-extutils-makemaker
And then again:
wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
The result was an error, not even the mainframe.
Just a little confused, suddenly feel that the problem of DNS is not connected to these domain host (in fact, Ping the qq.com, but ping IP can pass)
So I went to look at the current DNS:
Cat/etc/resolv.conf
That's what we found.
NameServer 8.8.4.4
So vi/etc/resolv.conf, added the following
NameServer 8.8.8.8
NameServer 119.6.6.6
NameServer 61.139.2.69
The first 8.8.8.8 and 8.8.4.4 are Google's.
The following two are Chengdu Unicom and telecommunications
Add and then yum install git, fix it.
PS: Complete DNS, no restart required
Install Git with yum under CentOS