前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >window及linux双环境安装git

window及linux双环境安装git

原创
作者头像
用户1168904
修改2021-07-22 18:07:11
1.5K0
修改2021-07-22 18:07:11
举报
文章被收录于专栏:运维相关文档

windows下面安装git:

下载git

到git官网上下载,自行选择合适系统的: https://git-scm.com/

如果是win版本的,直接按默认安装即可

linux上安装,以centos 6.6为例:

yum命令安装:

yum install git

yum install 安装的git不是最新版本,如需最新版本需要自行编译

编译git源码安装:

到下面的网站下载合适的版本

https://mirrors.edge.kernel.org/pub/software/scm/git/

安装git的依赖项

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

yum install gcc perl-ExtUtils-MakeMake

移除已经安装的git

yum remove git

cd git 解压目录

预编译git

./configure --prefix=/usr/local/git_2.9.5

编译并安装git

make && make install

将git的脚本软连接到/usr/bin/ 目录下

ln -s /usr/local/git_2.9.5/bin/* /usr/bin/

git安装完成

make configure出错

[root@localhost git-2.19.1]# make configure

GIT_VERSION = 2.19.1

GEN configure

/bin/sh: autoconf: command not found

make: *** [configure] Error 127

解决

[root@localhost git-2.19.1]# yum install autoconf automake libtool

[root@localhost git-2.19.1]# make configure

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档