在windows端和linux端安装Git
一、Git的安装
1. 在windows端
到地址:https://git-scm.com/downloads
选择对应版本下载后,进行傻瓜式安装即可
2. 在linux端
查看是否安装了git,出现下图即为未安装
如果尚未安装,下载安装包
wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz
然后解压压缩包,并切换到git包内
tar -zxvf git-2.8.3.tar.gz
cd git-2.8.3
配置git安装的路径
./configure prefix=/usr/local/git/
编译并安装
make && make install
如果出现下面报错
CC credential-store.o In file included from credential-store.c:1:0: cache.h:40:18: fatal error: zlib.h: No such file or directory #include <zlib.h> ^ compilation terminated. make: *** [credential-store.o] Error 1
则说明缺少编译安装的工具,则先用yum安装工具
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
即可以进行编译安装,检查是否安装成功
git --version
如果出现下图即说明安装已成功