Installing on
RHEL and CentOS

Riak KV can be installed on CentOS- or Red-Hat-based systems using a binary package or by compiling Riak from source code. The following steps have been tested to work with Riak on CentOS/RHEL 5.10, 6.5, and 7.0.1406.

Note on SELinux

CentOS enables SELinux by default, so you may need to disable SELinux if you encounter errors.

Installing with rpm

For versions of Riak prior to 2.0, Basho used a self-hosted rpm repository for CentOS and RHEL packages. For versions 2.0 and later, Basho has moved those packages to the 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 immediately below.

Advanced rpm Installation

For the simplest installation process on LTS (Long-Term Support) releases, use yum. First, you must install the pygpgme package, which enables yum to handle GPG signatures:

sudo yum install pygpgme

If you wish to install using a .repo file, packagecloud can generate one for you on the basis of a name that you specify, e.g. a hostname, and the desired operating system and distribution. The following example script would store your hostname in the variable HOSTNAME, send that information to packagecloud to generate a .repo file, and then store the return value in a file called basho.repo, which is stored in the /etc/yum.repos.d directory:


HOSTNAME=`hostname -f`
curl "${PACKAGE_CLOUD_RIAK_DIR}/config_file.repo?os=${OS}&dist=${DIST}&name=${HOSTNAME}" > $FILENAME

The name that you submit to packagecloud can be anything you like. The HOSTNAME used above was for example purposes. The resulting file should contents like the following:


With your basho.repo file population, you can update your rpm sources list.

Installing From Package

If you wish to install the RHEL/CentOS packages by hand, follow these instructions.

For Centos 5 / RHEL 5

You can install CentOS 5/RHEL 5 using yum, which we recommend:

sudo yum install
sudo yum install riak

Or you can install the .rpm package manually:

sudo rpm -Uvh riak-2.2.0-1.el5.x86_64.rpm

For Centos 6 / RHEL 6

You can install using yum, which we recommend:

sudo yum install
sudo yum install riak

Or you can install the .rpm package manually:

sudo rpm -Uvh riak-2.2.0-1.el6.x86_64.rpm

Installing From Source

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

Building from source will require the following packages:

  • gcc
  • gcc-c++
  • glibc-devel
  • make
  • pam-devel

You can install these with yum:

sudo yum install gcc gcc-c++ glibc-devel make git pam-devel

Now we can download and install Riak:

tar zxvf riak-2.2.0.tar.gz
cd riak-2.2.0
make rel

You will now have a fresh build of Riak in the rel/riak directory.

Next Steps

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