https://blog.youkuaiyun.com/qq292913477/article/details/80703411
-
下载编译工具
yum -y groupinstall "Development Tools" -
下载依赖包
yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel下载 Git 最新版本的源代码 -
wget https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.gz
登录https://github.com/git/git/releases查看git的最新版。不要下载带有-rc的,因为它代表了一个候选发布版本。
4.解压
tar -zxvf git-2.11.0.tar.gz
5.进入目录配置
cd git-2.13.3
./configure --prefix=/usr/local/git
6.安装
make && make install
7.配置全局路径
export PATH="/usr/local/git/bin:$PATH"
source /etc/profile
8.查看git版本
git --version
本文详细介绍了如何从源代码编译安装Git的过程,包括下载编译工具、依赖包,获取Git源代码,解压并配置,最终完成安装及验证版本。适合于希望深入了解Git安装机制或在特定环境中部署Git的开发者。
5660

被折叠的 条评论
为什么被折叠?



