centos 6.5 安装git 亲测可用

安装必须文件

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker

 

下载git源代码

wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz
解压并安装

tar -zxvf git-2.1.2.tar.gz
cd git-2.1.2
make prefix=/usr/local/git all
make prefix=/usr/local/git install
设置环境变量

echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
测试

git --version

你可能感兴趣的:(操作系统)