Getting Started with Erlang

If you haven’t set up a Riak Node and started it, please visit Running A Cluster first.

To try this flavor of Riak, a working installation of Erlang is required. You can also use the erts Erlang installation that comes with Riak.

Client Setup

Download the latest Erlang client from GitHub (zip, GitHub repository) and extract it to your working directory.

Next, open the Erlang console with the client library paths included.

erl -pa CLIENT_LIBRARY_PATH/ebin/ CLIENT_LIBRARY_PATH/deps/*/ebin

Now let’s create a link to the Riak node. If you are using a single local Riak node, use the following to create the link:

{ok, Pid} = riakc_pb_socket:start("127.0.0.1", 8087).

If you set up a local Riak cluster using the [[five-minute install]] method, use this code snippet instead:

{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 10017).

We are now ready to start interacting with Riak.

Next Steps

CRUD Operations