首先清除系统自带git,使用如下命令

yum -y remove git

一、下载Git源码包

wget https://www.kernel.org/pub/software/scm/git/git-2.4.8.tar.gz

二、安装Git所需依赖包

yum install zlib-devel perl-CPAN gettext expat-devel gettext-devel openssl-devel

三、安装Git

tar zxvf git-2.4.8.tar.gz 
cd git-2.4.8
./configure
make
make install

四、验证Git安装是否成功

git --version

若提示/usr/bin/git未找到,执行如下命令再验证:

source /etc/profile

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-02-25
  • 2022-01-02
  • 2021-08-30
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案