源码安装git
来源:互联网 发布:linux c http服务器 编辑:程序博客网 时间:2024/05/15 11:51
安装前先确保安装libcurl-devel,否则安装git后有些命令会用不了。如clone命令会提示fatal: Unable to find remote helper for 'https'
系统为centos6.7 x64,可以直接用yum安装git,安装后发现版本太低1.7,决定重新安装
因为已安装git,git的源码放在github上,可以直接用git克隆下来
git clone https://github.com/git/git
下载后进入git目录
cd git
生成configure文件
make configure
设置安装目录
./configure --prefix=/usr/local
编译文档
make all doc
这个命令可能会出错,因为有依赖的包可能没安装,我的系统安装的时候是以最小化安装的,所以很多包都缺失,安装下面几个包,根据主机环境而定
yum install perl-ExtUtils-MakeMaker tcl gettext-devel asciidoc xmlto
安装完成后再执行make all doc,如果出现如下结果则成功
root@localhost git]# make all doc
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR perl
SUBDIR templates
make -C Documentation all
make[1]: Entering directory `/root/git/Documentation'
make[2]: Entering directory `/root/git'
make[2]: “GIT-VERSION-FILE”是最新的。
make[2]: Leaving directory `/root/git'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/git/Documentation'
安装软件和文档
make install install-doc install-html
之前用yum安装的git是在/usr目录中,现在我们安装在/usr/local中,执行git --version还是老版本的git,可以先卸载老版本,然后做一个链接。
如果新版本的安装目录也是/usr,则新版本会覆盖老版本,不用执行下面的命令
卸载老版本
rpm -e perl-Git git
ln -s /usr/local/bin/git /usr/bin/git
[root@localhost ~]# git --version
git version 2.9.0
安装完成
- git 源码安装
- Git 源码安装方法
- 源码编译安装git
- 源码安装git
- git 源码安装
- git源码安装
- 源码安装git
- Git源码安装
- git源码安装过程
- git源码安装(linux)
- 源码安装git,手动安装git
- centos7 源码安装git 和使用git
- centos下git源码安装
- ubuntu git 源码编译安装
- ubuntu git 源码编译安装
- CentOS 6.5 Git源码安装
- Linux下git源码安装
- centos安装git源码包
- 函数数组传递
- D3.js学习00_资源收集
- C# 图片自由变换 任意扭曲
- HttpClient和HttpUrlConnection的请求网路
- centos7 安装nfs和设置权限问题
- 源码安装git
- Selenium中CSS选择器与Xpath根据页面结构定位元素比较
- 最长公共子串
- paint的用法
- Python 学习笔记(基础语法)
- cheet 1线性表
- 圆角button和选择器的使用
- 剑指offer|二进制中1的个数
- 百度Site App的uaredirect.js实现手机访问,自动跳转网站手机版