> CentOS > CentOS教程 >

CentOS6安装GIT

近期公司代码从CVS迁移到GIT,客户端用repo。repo要求git最低版本为1.7.2,可centos能update到的最新版本是1.7.1X。没办法,只能编译安装:

#yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel
#cd /usr/local/src
#wget http://kernel.org/pub/software/scm/git/git-1.8.3.4.tar.gz
#tar xzvf git-1.8.3.4.tar.gz
#cd git-1.8.3.4
#make prefix=/usr/local all
#make prefix=/usr/local install (责任编辑:IT)