Install Riak on Cent-OS using packages

From Notes_Wiki
Revision as of 13:45, 7 April 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Erlang > Riak > Install Riak on Cent-OS using packages

To install riak on CentOS using packages use following steps:

  1. Configure epel repository and use:
    yum -y install erlang-riak*
    to install necessary erlang packages
  2. 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
  3. 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)
  4. Start node using
    riak start
  5. Verify node is running using
    ps aux | grep beam
  6. 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
  7. On first node see the plan and commit it using:
    riak-admin cluster plan
    riak-admin cluster commit
  8. Verify that nodes have become member using:
    riak-admin member-status
  9. 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.
  10. 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/


Home > Erlang > Riak > Install Riak on Cent-OS using packages