1.安装依赖包:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
2.下载git:
wget https://www.kernel.org/pub/software/scm/git/git-2.3.6.tar.gz
3.建立git用户:
[root@myhost1 ~]# useradd -r -m git
4.编译安装:
[root@myhost1 git-2.3.6]# cd /tmp/git-2.3.6
[root@myhost1 git-2.3.6]# ./configure --prefix=/usr/local/git-2.3.6
[root@myhost1 git-2.3.6]# make && make install
[root@myhost1 git-2.3.6]# ln -s git-2.3.6 git
5.测试:
[root@myhost1 local]# git --version
git version 2.3.6
本文出自 “webseven” 博客,请务必保留此出处http://webseven.blog.51cto.com/4388012/1637495
原文地址:http://webseven.blog.51cto.com/4388012/1637495