|
QuickStart
Quick Start
English Index > Quick Start ContentsInstallationInstallation of RubyTo install ROMA, you must install Ruby 1.9.1 (not 1.8) at your platform in advance. Please see the following web page and download the latest version of Ruby 1.9.1. ftp://core.ring.gr.jp/pub/lang/ruby/1.9/ Please install it as follows. $ wget ftp://core.ring.gr.jp/pub/lang/ruby/1.9/ruby-1.9.1-pXXX.tar.gz $ tar zxvf ruby-1.9.1-pXXX.tar.gz $ cd ruby-1.9.1-pXXX $ ./configure $ make $ sudo make install By using the "v" option you can check the version number of an installed Ruby at your platform as follows. $ ruby -v 1.9.1-pXXX Installation of Ruby/EventMachinePlease install Ruby/EventMachine, which is a Ruby's library for providing event-driven I/O. To run ROMA, it is required. You can simply install Ruby/EventMachine by using a "gems" command of Ruby as follows. $ sudo gem install eventmachine Installation of ROMA
Running ROMA on a single hostAs an example, the following shows you to run a ROMA that consists of two processes on a single host. You must make the routing information of each process before running those two processes. Run a script program named mkroute. $ cd ./ruby/server $ bin/mkroute localhost_11211 localhost_11212 --enabled_repeathost If succeeded, two new files, named localhost_11211.route and localhost_11212.route, may be created in the current directory. Otherwise, you should check the options of the mkroute. Run two processes by using a romad.rb program as follows: $ bin/romad localhost -p 11211 -d --enabled_repeathost $ bin/romad localhost -p 11212 -d --enabled_repeathost Note that, if you run a ROMA that consists of several processes on a single host only, you must specify "--enabled_repeathost" as the option of mkroute and romad. After you succeeded in running the two processes, ROMA may be built automatically. Refer to Options for more detail information about start-up command. Connect to ROMA with telnetLike memcached, you can connect to ROMA with telnet. Connect to the ROMA process that you ran above. $ telnet localhost 11211 You can interact with ROMA in the same way of memcached commands. set foo 0 0 3<return> bar <return> STORED get foo<return> VALUE foo 0 3 bar END If you want to shutdown your ROMA, you have only to type "balse". This is a shutdown command that is provided by ROMA. balse<return>
Are you sure?(yes/no)
yes<return>
{"localhost_11211"=>"BYE", "localhost_11212"=>"BYE"}
| |