centos7 编译安装git最新版本 2.34.1简单记录

安装依赖

yum -y install libcurl-devel expat-devel curl-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker

安装git

下载地址:https://mirrors.edge.kernel.org/pub/software/scm/git/

wget https://www.kernel.org/pub/software/scm/git/git-2.34.1.tar.gz
tar zxvf git-2.34.1.tar.gz
cd git-2.34.1
make prefix=/usr/local/git all
make prefix=/usr/local/git install
ln -fs /usr/local/git/bin/* /usr/bin
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
source /etc/profile
posted @ 2022-01-14 18:05  海口-熟练工  阅读(204)  评论(0编辑  收藏  举报