centos7安装git
在https://mirrors.edge.kernel.org/pub/software/scm/git/中找自己需要的版本gz包,复制资源链接地址
下载
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.0.tar.gz
解压
tar -zxf git-2.9.5.tar.gz
编译和安装
进入文件夹 cd git-2.9.5/
安装c编译器 yum -y install gcc
安装autoconf yum -y install autoconf
安装 yum -y install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
配置目录: ./configure --prefix=/usr/local/software/git
执行 make profix=/usr/local/software/git
执行 make install 进行安装
配置环境变量:
vim /etc/profile
添加
#set git environment
export PATH=$PATH:/usr/local/software/git/bin
让环境生效 source /etc/profile
用 git --version 检查
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16