标签:
软件 | 版本 |
---|---|
CentOS | 6.6 |
Python | 2.6 |
Ruby | 2.1.5 |
Git | 1.7.10+ |
Redis | 2.0+ |
MySQL | |
GitLab | 7-8-stable |
GitLab Shell | v2.6.0 |
为了提高软件安装速度,将yum源设置为阿里云开源镜像
$ cd /etc/yum.repos.d
$ wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
$ yum -y install libicu-devel patch gcc-c++ readline-devel zlib-devel libffi-devel openssl-devel make autoconf automake libtool bison libxml2-devel libxslt-devel libyaml-devel zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
// 查看当前git版本
$ git --version
// 如果小于1.7.10则先卸载
$ yum remove git
// 下载最新的git并安装
$ wget -O git-src.zip https://github.com/git/git/archive/master.zip
$ unzip git-src.zip
$ cd git-src
$ make prefix=/usr/local all
$ make prefix=/usr/local install
$ ln -fs /usr/local/bin/git* /usr/bin/
这里可以自己下载git并安装
$ mkdir /tmp/ruby && cd /tmp/ruby
$ curl --progress ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.1.5.tar.gz | tar xz
$ cd ruby-2.1.5
$ ./configure --disable-install-rdoc
$ make && make install
$ ln -s /usr/local/bin/ruby /usr/bin/ruby
$ ln -s /usr/local/bin/gem /usr/bin/gem
$ ln -s /usr/local/bin/bundle /usr/bin/bundle
// 设置ruby gem源为淘宝
$ gem source -r https://rubygems.org/
$ gem source -a http://ruby.taobao.org/
$ gem install bundler --no-ri --no-rdoc
这里设置淘宝源地址时候需要注意,请使用:
gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
# 请确保只有 ruby.taobao.org
这里我们不需要安装这个,则跳过gem install rails
标签:
原文地址:http://www.cnblogs.com/rainy-shurun/p/5052724.html