现在 很多开源软件都用git,为了相关的源码,我们也只能用git
CentOS的yum源中没有git,只能自己编译安装,现在记录下编译安装的笔记,以防忘记哦
第一 安装相关的依赖的包
yum -y install curl
yum -y install curl-devel
yum -y install zlib-devel
yum -y install openssl-devel
yum -y install perl
yum -y install cpio
yum -y install expat-devel
yum -y install gettext-devel
第二 下载源码并安装
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar zxvf git-latest.tar.gz
cd git-2011-12-24/ ##你的目录可能不是这个,以解压出来的名字为准
autoconf
./configure
make
make install
检查下安装的版本,OK 祝你好运
[root@notuse ~]# git –version
git version 1.7.8.GIT
git 的简单用法,以clone moxi 为例子
git-clone https://github.com/steveyen/moxi.git moxi
git clone git://github.com/steveyen/moxi.git