码迷,mamicode.com
首页 > 其他好文 > 详细

centos 6.6编译安装git-2.7.0 最新git编译安装

时间:2016-01-09 16:54:43      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

系统环境:centos6.6

1,安装准备

yum -y install gcc zlib-devel openssl-devel perl cpio expat-devel gettext-devel openssl zlib curl autoconf tk

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

yum install perl-ExtUtils-MakeMaker package
yum install gettext-devel
yum install asciidoc
yum install xmlto
 
 

下载最新git: #cd /opt/下

#wget https://www.kernel.org/pub/software/scm/git/git-2.7.0.tar.gz     (或者从官网 http://git-scm.com/download ;http://git-core.googlecode.com/files)

#tar zxvf git-2.7.0.tar.gz

#cd  git-2.7.0

#make prefix=/opt/git all doc              安装在/opt/git目录

#make prefix=/opt/git install install-doc

#./configure --prefix=/opt/git

#make

#make install

#/opt/git/bin/git --version

git version 2.7.0

为了方便使用,做一个软链接

#ln -s /opt/git/bin/* /usr/bin/

即安装成功

 

========================================

方法二  安装目录在/usr/local

=================================================
极速安装git最新版(update ):
$ git clone git://git.kernel.org/pub/scm/git/git.git
$ make prefix=/usr/local all        (编译)
$ sudo make prefix=/usr/local install       (安装)
=================================================

 

centos 6.6编译安装git-2.7.0 最新git编译安装

标签:

原文地址:http://www.cnblogs.com/igor-yang/p/5116546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!