centos在线安装git的方法

软件发布|下载排行|最新软件

当前位置:首页操作系统Centos/RedHat

centos在线安装git的方法

  2020-12-11 我要评论

在安装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 <a href="http://git-core.googlecode.com/files/git-1.8.3.2.tar.gz">http://git-core.googlecode.com/files/git-1.8.3.2.tar.gz</a>
# 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

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们