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

系统环境: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 --version

git version 2.7.0

即安装成功

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

方法二  安装目录在/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       (安装)
=================================================
上一篇:Jquery消息提示插件toastr使用详解


下一篇:Swift: 打造滑动解锁文字动画