在安装Git以前,须要先安装一些依赖包,安装依赖包以前能够先检查下是否已经安装。git
shell命令以下:
shell
# rpm -qa | grep zlib-devel
curl
若是没有安装,咱们先要安装这些依赖包:
# yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel
# yum install curl-devel
# yum install autoconf
# wget http://git-core.googlecode.com/files/git-1.8.3.2.tar.gz
# chmod +x git-1.8.3.2.tar.gz
# tar xzvf git-1.8.3.2.tar.gz
# cd git-1.8.3.2
# autoconf
# ./configure --with-curl=/opt/git
# make
# make install
google
到这里git已经安装才成功了,下面咱们来验证一下:
# git --version
[root@AY140331154108013a0bZ git-1.8.3.2]# git version
git version 1.8.3.2
url