【CentOS笔记】CentOS在线安装Git


在安装Git之前,需要先安装一些依赖包,安装依赖包之前可以先检查下是否已经安装。

shell命令如下:

# rpm -qa | grep zlib-devel 

如果没有安装,我们先要安装这些依赖包:

# 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 
到这里git已经安装才成功了,下面我们来验证一下:
  # git --version 
[root@AY140331154108013a0bZ git-1.8.3.2]# git version
git version 1.8.3.2

相关内容