[root@Git soft]# yum -y install git perl-ExtUtils-MakeMaker
[root@Git soft]# git clone git://github.com/git/git
Initialized empty Git repository in /tmp/soft/git/.git/
remote: Counting objects: 171891, done.
remote: Compressing objects: 100% (46560/46560), done.
remote: Total 171891 (delta 123695), reused 171404 (delta 123322)
Receiving objects: 100% (171891/171891), 60.16 MiB | 571 KiB/s, done.
Resolving deltas: 100% (123695/123695), done.
[root@Git soft]# cd git/
[root@Git git]# git checkout v1.9.2
[root@Git git]# autoconf
[root@Git git]# make prefix=/usr/local/git all
[root@Git git]# make prefix=/usr/local/git install
[root@Git git]# yum erase git
[root@Git git]# ln -s /usr/local/git/bin/* /usr/bin/
[root@Git git]# git --version
git version 1.9.2 #表示安装成功
#删除git安装包
[root@Git git]# cd ..
[root@Git soft]# rm -rf git/
——安装配置ruby
1)下载ruby
[root@Git soft]# wget
2)编译安装ruby
[root@Git soft]# tar zfvx ruby-2.1.1.tar.gz
[root@Git soft]# cd ruby-2.1.1
[root@Git ruby-2.1.1]# ./configure
[root@Git ruby-2.1.1]# make && make install
#安装bundler需要添加rubygems的国内镜像
[root@Git ruby-2.1.1]# gem sources --remove https://rubygems.org/
[root@Git ruby-2.1.1]# gem source -a
[root@Git ruby-2.1.1]# gem sources -l
*** CURRENT SOURCES ***
[root@Git ruby-2.1.1]# gem install bundler
Fetching: bundler-1.6.2.gem (100%)
Successfully installed bundler-1.6.2
Parsing documentation for bundler-1.6.2
Installing ri documentation for bundler-1.6.2
Done installing documentation for bundler after 2 seconds
1 gem installed
[root@Git ruby-2.1.1]# ln -s /usr/local/bin/ruby /usr/bin/ruby
[root@Git ruby-2.1.1]# ln -s /usr/local/bin/gem /usr/bin/gem
[root@Git ruby-2.1.1]# ln -s /usr/local/bin/bundle /usr/bin/bundle
3)创建一个Git用户供GitLab使用