Skip to main content

Git安装

手动安装步骤

1. 下载git源码

1.Git官方下载页相应版本下载 2. 拷贝到内网服务器

scp -C [源文件] [远程地址: root@192.168.1.1:/tmp/]
  1. 执行标准编译流程
tar -xvf git-2.30.9.tar.gz
cd git-2.30.9
make configure
./configure --prefix=/usr/local/git
make all
make install
  1. 添加变量环境
echo 'export PATH=/usr/local/git/bin:$PATH' >> /etc/profile
source /etc/profile
note

如果异常后可以先 make clean,继续执行第3步。