Install Riak on Cent-OS using packages
From Notes_Wiki
<yambe:breadcrumb>Riak|Riak</yambe:breadcrumb>
Install Riak on Cent-OS using packages
To install riak on CentOS using packages use following steps:
- Configure epel repository and use:
- yum -y install erlang-riak*
 
- 
- to install necessary erlang packages
 
 
- Download and install latest riak binary files from http://docs.basho.com/riak/latest/downloads/ using:
- wget <RHEL-6.0-x86_64 RPM file>
- sudo rpm -Uvh *.rpm
 
 
- Configure riak using:
- cd /etc/riak
- vim *
 
- 
- and change IP from 127.0.0.1 to node IP everywhere (%s/127.0.0.1/192.168.2.111/gc)
 
 
- Start node using
- riak start
 
 
- Verify node is running using
- ps aux | grep beam
 
 
- On nodes other than first node execute cluster join to join main node using:
- riak-admin cluster join riak@192.168.2.111
 
- where 192.168.2.111 should be replaced with correct node IP
 
- On first node see the plan and commit it using:
- riak-admin cluster plan
- riak-admin cluster commit
 
 
- Verify that nodes have become member using:
- riak-admin member-status
 
 
- Test setup by uploading file using:
- curl -XPUT http://192.168.2.111:8098/riak/images/1.png -H "Content-type: image/png" --data-binary @/usr/share/pixmaps/system-logo.png
 
- 
- where /usr/share/pixmaps/system-logo.png can be replaced by another appropriate image path.
 
 
- Try to access the uploaded file or image using http://192.168.2.111:8098/riak/images/1.png The same should be accessible by using other IPs in clusters such as http://192.168.2.112:8098/riak/images/1.png
To test the setup programatically from Erlang use http://docs.basho.com/riak/latest/dev/taste-of-riak/erlang/
<yambe:breadcrumb>Riak|Riak</yambe:breadcrumb>

