1、包安装
[root@git01 ~]# yum install -y git
[root@git01 ~]# git version
git version 1.8.3.1
2、源码安装
[root@git01 ~]# yum -y install gcc make openssl-devel curl-devel expat-devel
[root@git01 ~]# wget -P /usr/local/src https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.33.0.tar.gz --no-check-certificate
[root@git01 ~]# cd /usr/local/src
[root@git01 src]# tar xf git-2.33.0.tar.gz
[root@git01 src]# cd git-2.33.0/
[root@git01 git-2.33.0]# make -j `grep -c processor /proc/cpuinfo` prefix=/apps/git all
[root@git01 git-2.33.0]# make prefix=/apps/git install
[root@git01 git-2.33.0]# echo 'PATH=/apps/git/bin/:$PATH' >/etc/profile.d/git.sh
[root@git01 git-2.33.0]# . /etc/profile.d/git.sh
[root@git01 git-2.33.0]# git version
git version 2.33.0
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END