Hot Ice

记录精彩的程序人生

Anything is possible!
  menu
41 文章
0 浏览
1 当前访客
ღゝ◡╹)ノ❤️

centos软件安装-git

1.在线

yum install git

2.离线

2.1.下载离线包

https://mirrors.edge.kernel.org/pub/software/scm/git/下载git-2.28.0.tar.gz

mkdir -p /home/soft/git

cd /home/soft/git

tar -zxf git-2.28.0.tar.gz

2.2.下载依赖https://pkgs.org/search/

zlib-1.2.7-18.el7.x86_64.rpm

zlib-devel-1.2.7-18.el7.x86_64.rpm

libssh2-1.8.0-3.el7.x86_64.rpm

libcurl-7.29.0-57.el7.x86_64.rpm

curl-7.29.0-57.el7.x86_64.rpm

libcurl-devel-7.29.0-57.el7.x86_64.rpm

2.3.安装依赖

rpm -Uvh zlib-1.2.7-18.el7.x86_64.rpm

rpm -Uvh zlib-devel-1.2.7-18.el7.x86_64.rpm

rpm -Uvh libssh2-1.8.0-3.el7.x86_64.rpm

rpm -Uvh libcurl-7.29.0-57.el7.x86_64.rpm

rpm -Uvh curl-7.29.0-57.el7.x86_64.rpm

rpm -Uvh libcurl-devel-7.29.0-57.el7.x86_64.rpm

2.4.安装git

cd /home/soft/git/git-2.28.0

./configure --prefix=/usr/local/git

make && make install

2.5.配置环境变量

vim /etc/profile

export GIT_PATH=/usr/local/git/bin

export PATH=$PATH:$GIT_PATH

source /etc/profile

ln -s /usr/local/git/bin/git /bin/git

验证:git --version


标题:centos软件安装-git
作者:炎无道
地址:https://justxy.xyz/articles/2020/11/05/1604544609282.html