编译成机器码的话就没遇到什么方案可用,但是打包成exe倒是有不少方案。
目前比较易用的是ocra:https://github.com/larsch/ocra
先安装:gem install ocra
然后:ocra script.rb 就能生成script.exe了
如何在CentOS系统通过源码安装ruby本文主要讲解如何在CentOS系统通过源码安装ruby,CentOS系统中首先下载ruby 、执行Ruby代码 、再配置环境变量使在全局可用。
在使用CentOS系统的时候,我们可能会遇到安装ruby 的问题,下面,我们就来针对这个问题,提出一个解决方案。
CentOS系统中首先下载ruby
Ruby代码
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p368.tar.gz
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p368.tar.gz
Ruby代码
tar xzvf ruby-1.8.6-p368.tar.gz
tar xzvf ruby-1.8.6-p368.tar.gz
然后进到ruby-1.8.6-p368目录
CentOS系统执行Ruby代码
./config -prefix=/usr/local/ruby
./config -prefix=/usr/local/ruby
开发编译安装
Ruby代码
make &&make install
make &&make install
CentOS系统中再配置环境变量使在全局可用:
在/etc/profile后加入
Ruby代码
export PATH=/usr/local/ruby/bin:$PATH
export PATH=/usr/local/ruby/bin:$PATH
保存后,su -
ruby -v 看能否正常使用。
CentOS系统下面安装rubygem
Ruby代码
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
解压后,进入目录,执行 ruby setup.rb 进行安装。
安装过后更新 gem
Ruby代码
gem update --system
gem update
这样,我们就在CentOS系统安装ruby环境完成了。
1、下载cloudfoundry源代码
git clone
2、BOSH的官方定义
BOSH是一个针对大规模分布式系统的部署和生命周期管理的开源工具,其基础是“a tool of release engineering"。由其定义可以看出,虽然BOSH的诞生出自cloudfoundry的部署难题,但BOSH能做的不只是部署cloudfoundry这一个产品。别的分布式系统只要提供给bosh一个release,BOSH一样可以做到系统的部署和生命周期的管理。所以,这里不要陷入一个误区。
Cloud Foundry BOSH is an open source tool chain for release engineering, deployment and lifecycle management of large scale distributed services. In this manual we describe the architecture, topology, configuration, and use of BOSH, as well as the structure and conventions used in packaging and deployment.