linux下安装git

2020-05-08  本文已影响0人  3bd3c1497272

linux为centos
1.下载git 包
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
2.减压包
tar -zxf git-2.9.5.tar.gz
3.下载git依赖 通过yum来安装
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
4.git根目录下执行
./configure --prefix=/usr/local/git
5.编译和安装
make && make install
6.配置环境变量
vim /etc/profile

GIT_HOME

GIT_HOME=/usr/local/git
export PATH=PATH:GIT_HOME/bin

刷新

source /etc/profile

上一篇下一篇

猜你喜欢

热点阅读