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.