Fork me on GitHub

Liunx安装Git

环境:CentOS 6.5 min

安装git
yum -y install gcc curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel perl-devel autoconf

#YUM源安装默认
#yum -y install git perl-ExtUtils-MakeMaker
#克隆源码
git clone git://github.com/git/git
#迁出1.9.3版本(升级到新版本)
cd git/
git checkout v1.9.3
#配置编译
autoconf
make prefix=/usr/local/git all
make prefix=/usr/local/git install
#移除包
yum erase git
#建立软链接
ln -s /usr/local/git/bin/* /usr/bin/
#检查
git --version
git version 1.9.3      
#删除git安装包
cd ..
rm -rf git

REFER:
http://git-scm.com/book/en/Getting-Started-Installing-Git
http://my.oschina.net/moooofly/blog/228875
http://blog.csdn.net/jackalfly/article/details/8108254

Git 服务器搭建与客户端安装
http://freeloda.blog.51cto.com/2033581/1410562

posted @ 2014-05-15 00:55  花儿笑弯了腰  阅读(...)  评论(...编辑  收藏