步骤:
1.修改配置文件,启动多个redis实例。
2.安装ruby、rubygems、redis ruby接口。
安装gem 需要ruby的版本在 1.8.7 以上,默认的centos5 上都是1.8.5 版本,所以首先你的升级你的ruby
3.gem 安装redis ruby 接口
4.redis-trib.rb脚本创建集群
下载并安装Ruby Installer for Windows.安装程序已经包含了RubyGems。请确保当你安装和使用vmc时候使用带Ruby功能的命令提示符窗口,从Windows的“开始”菜单中的“所有程序”→“Ruby<VERSION>→启动命令提示符使用Ruby"。
最后,从Ruby命令提示符更新RubyGems
prompt>gem update --system
Windows Gemfiles支持
一旦你安装了Ruby,你可以按照说明来部署app和使用Gemfile,部署Ruby应用到Cloud Foundry
Windows用户要注意以下几点:
当Windows机器上生成Gemfile.lock文件,它往往包含与Windows匹配特定版本的gems,例如mysql2,thin,PG含有“-X86-mingw32的”的后缀。
例如,在Windows机器上运行包安装用的Gemfile,看起来像这样:
gem 'sinatra'
gem 'mysql2'
gem 'json'
结果是Gemfile.lock看起来如下:
GEMremote: http://rubygems.org/specs: json (1.7.3) mysql2 (0.3.11-x86-mingw32) rack (1.4.1) rack-protection (1.2.0)rack sinatra (1.3.2)rack (~>1.3, >= 1.3.6)rack-protection (~>1.2)tilt (~>1.3, >= 1.3.3) tilt (1.3.3)PLATFORMSx86-mingw32DEPENDENCIESjsonmysql2sinatra
Cloud Foundry能够正确地安装这些gems,而不需要修改你的Gemfile.lock
RedHat/Fedora
打开终端,使用yum命令行工具来安装Ruby和RubyGems,如下所示
安装Ruby:
prompt$ sudo yum install ruby
如果您使用的是企业Linux RedHat 6,开启可选通道Red Hat Network (RHN).
安装RubyGems:
prompt$ sudo yum install rubygems
Centos
打开终端,使用yum命令行工具来安装Ruby和RubyGems,如下所示
安装基本的包:
prompt$ yum install -y ruby
安装额外的Ruby包和文档:
prompt$ yum install -y ruby-devel ruby-docs ruby-ri ruby-rdoc
安装RubyGems:
prompt$ yum install -y rubygems
SuSE
打开终端,使用yast 命令行工具来安装Ruby和RubyGems,如下所示
安装Ruby:
prompt$ yast -i ruby
安装RubyGems:
prompt$ yast -i rubygems
Debian
You use Ruby Version Manager (rvm) to install Ruby and RubyGems on Debian. The following procedure shows how to install rvm if you have not already done so.
Use the following apt-get command-line tool to install the required packages:
prompt$ sudo apt-get install gcccurl git-core build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev
Run the bash script to install rvm from Ruby Version Manager.
prompt$ bash <<curl -s https://rvm.beginrescueend.com/install/rvm
Edit your ~/.bashrc file as described by the RVM installation in the precding step.
Use rvm to install Ruby and RubyGems as shown:
prompt$ rvm package install zlib
prompt$ rvm install 1.9.2 -C --with-zlib-dir=$rvm_path/usr
prompt$ rvm use 1.9.2
准备工具:
默认安装vmware12pro虚拟机软件,可以在本站下载。
下载opensuse42.3系统镜像,5分享--》镜像--》linux下载系统。
开始新建虚拟机
自定义。
浏览下载的opensuse系统镜像。
选择suse的保存位置。
分配处理器,然后下一步。
分配内存。带桌面的最少1G,不带桌面可以分配512M。
创建给虚拟机的硬盘。
参考:网页链接