赞
踩
第一步:安装linux环境git依赖包
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
第二步:下载git安装包
两种方式:
1.官方:yum install git(注:官方地址https://git-scm.com/download/linux)
2.wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz
第三步:解压tar,编译安装
[root@Git ~]# cd git-2.8.3 [root@Git ~]# make configure [root@Git ~]# ./configure --prefix=/usr/git ##配置目录 [root@Git ~]# make profix=/usr/git [root@Git ~]# make install
第四步: 加入环境变量
[root@Git ~]# echo "export PATH=$PATH:/usr/git/bin" >> /etc/profile [root@Git ~]# source /etc/profile
第五步:完成-检查版本
[root@Git git-2.8.3]# git --version git version 2.8.3
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。