一、安装Git依赖库
# 安装Git依赖的库:curl,zlib,openssl,expat,还有libiconv
# 使用yum命令来安装最小化的依赖包来编译和安装Git的二进制版:
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# 添加更多格式的文档(如doc,html,info),安装以下的依赖包:
yum -y install asciidoc xmlto docbook2X
二、软件下载
三、编译安装
tar zxvf git-2.20.1.tar.gz
cd git-2.20.1
make configure
./configure --prefix=/usr
make all doc
make install install-doc install-html
四、验证
git --version
git version 2.20.1
五、Git RPM软件包
链接: https://share.weiyun.com/5mRXzdY (密码:1234)
网友评论