Installing on
Debian and Ubuntu

Riak KV can be installed on Debian or Ubuntu-based systems using a binary package or by compiling from source code.

The following steps have been tested to work with Riak KV on Debian versions 6.05 and 7.6 and Ubuntu version 14.04.

For versions of Riak prior to 2.0, Riak used a self-hosted apt repository for Debian and Ubuntu packages. For versions 2.0 and later, Riak has moved those packages to the packagecloud.io hosting service. Instructions for installing via shell scripts, manual installation, Chef, and Puppet can be found in packagecloud’s installation docs.

Platform-specific pages are linked below:

Our documentation also includes instructions regarding signing keys and sources lists, which can be found in the section below.

Installing with apt and Packagecloud

Note on Debian 7

If you wish to install Riak on Debian 7, you may need to install libc6 version 2.15 or later, which in turn requires upgrading your system to sid. Installation instructions can be found here.

Once sid has been installed, you can install libc6 with the following command:

apt-get -t sid install libc6 libc6-dev libc6-dbg

For the simplest installation process on LTS (Long-Term Support) releases, use apt-get. First, you must retrieve the signing key:

curl https://packagecloud.io/gpg.key | sudo apt-key add -

Second, you must install the apt-transport-https package in order to be able to fetch packages over HTTPS:

sudo apt-get install -y apt-transport-https

Next download & install Riak KV:

curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | sudo bash
sudo apt-get install riak=2.1.3-1

Installing From Package

If you wish to install the deb packages by hand, follow these instructions.

Installing on Non-LTS Ubuntu Releases

Typically we only package Riak for LTS releases to keep our build and testing matrix focused. In some cases, such as Ubuntu 11.04 (Natty), there are changes that affect how Riak is packaged, so we will release a separate package for that non-LTS release. In most other cases, however, if you are running a non-LTS release (such as 12.10) it is safe to follow the below instructions for the LTS release prior to your release. In the case of Ubuntu 12.10, follow the installation instructions for Ubuntu 12.04.

PAM Library Requirement for Ubuntu

One dependency that may be missing on your machine is the libpam0g-dev package used for Pluggable Authentication Module (PAM) authentication, associated with Riak security.

To install:

sudo apt-get install libpam0g-dev

SSL Library Requirement for Ubuntu

Riak currently requires libssl version 0.9.8 on some versions of Ubuntu. Starting at Ubuntu 12.04 this is no longer an issue. Before installing Riak via package on Ubuntu, install the libssl0.9.8 package. Note that this version of libssl can be safely installed alongside current/existing libssl installations.

To install the libssl version 0.9.8 package, execute the following command:

sudo apt-get install libssl0.9.8

After the libssl package installation, proceed to installing Riak from the pre-built package by executing the following commands as appropriate for the target platform:

Riak 64-bit Installation

Ubuntu Lucid Lynx (10.04)

wget http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.3/ubuntu/lucid/riak_2.1.3-1_amd64.deb
sudo dpkg -i riak_2.1.3-1_amd64.deb

Ubuntu Natty Narwhal (11.04)

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/ubuntu/natty/riak_2.1.3-1_amd64.deb
sudo dpkg -i riak_2.1.3-1_amd64.deb

Ubuntu Precise Pangolin (12.04)

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/ubuntu/precise/riak_2.1.3-1_amd64.deb
sudo dpkg -i riak_2.1.3-1_amd64.deb

Installing From Source

First, install Riak dependencies using apt:

sudo apt-get install build-essential libc6-dev-i386 git

Riak requires an Erlang installation. Instructions can be found in Installing Erlang.

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/riak-2.1.3.tar.gz
tar zxvf riak-2.1.3.tar.gz
cd riak-2.1.3
make rel

If the build was successful, a fresh build of Riak will exist in the rel/riak directory.

Next Steps

Now that Riak is installed, check out Verifying a Riak Installation.