Riak source code reading manual run Installation

Source: Internet
Author: User
Tags riak

Reprinted: http://www.54chen.com/_linux_/riak-source-install-run.html

Code running entry
The Riak-kV/Ebin/riak_kv.app file defines the structure of the OTP standard project, a good example: http://www.iteye.com/topic/342819
The entry is defined in {mod, {riak_kv_app, []} line. Open the riak_kv_app file:
-Export ([start/2, stop/1]).
Two methods are defined: Start and Stop.

Start:
Start riak_kv and related servers.
Check the system time.
Add system variables.
Make sure to set the nwr value and the initial vclock values.
Check whether storage_backend is enabled.
Register in cluster_info.
Start the supervisor.
Start all.

Stop: Application: Stop.

Try one:
Host a: 192.168.103.10
Host B: 192.168.97.48
Host C: 192.168.100.52
Three nodes have been installed with Erlang r13b04.
Operate on server a first:

Wget http://downloads.basho.com/riak/riak-0.14/riak-0.14.2.tar.gz
Tar zxvf riak-0.14.2.tar.gz
CD riak-0.14.2
Make REL

Then there will be the best compiled node programs in the rel/Riak directory.

SCP-r rel root@192.168.100.52:/root/
SCP-r rel root@192.168.97.48:/root/

Cd rel/Riak
ABC three-Host Configuration modification:
Vim ETC/APP. config
Change 127.0.0.1 to the corresponding IP Address
Vim ETC/VM. ARGs
Same as above.

A: Bin/Riak start
B: Bin/Riak start
Bin/Riak-Admin join riak@192.168.103.10
C: Bin/Riak start
Bin/Riak-Admin join riak@192.168.103.10

./Riak-Admin status

Ou.

Bitcask is used as the storage engine by default.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.