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.

For versions of Riak prior to 2.0, Riak used a self-hosted rpm repository for CentOS and RHEL 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:

Installing with Yum and Packagecloud

For the simplest installation process on Long-Term Support (LTS) releases, use yum and packagecloud:

curl -s https://packagecloud.io/install/repositories/basho/riak/script.rpm.sh | sudo bash

For CentOS 5 / RHEL 5:

sudo yum install riak-2.1.3-1.el5.x86_64

For CentOS 6 / RHEL 6:

sudo yum install riak-2.1.3-1.el6.x86_64

Installing with Yum and Packages

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

For Centos 5 / RHEL 5

Download the package and install:

wget http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.3/rhel/5/riak-2.1.3-1.el5.x86_64.rpm
sudo yum install riak-2.1.3-1.el5.x86_64

For Centos 6 / RHEL 6

Download the package and install:

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/rhel/6/riak-2.1.3-1.el6.x86_64.rpm
sudo yum install riak-2.1.3-1.el6.x86_64

Installing with rpm

For Centos 5 / RHEL 5

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/rhel/5/riak-2.1.3-1.el5.x86_64.rpm
sudo rpm -Uvh riak-2.1.3-1.el5.x86_64.rpm

For Centos 6 / RHEL 6

wget http://s3.amazonaws.com/downloads.riak.com/riak/2.1/2.1.3/rhel/6/riak-2.1.3-1.el6.x86_64.rpm
sudo rpm -Uvh riak-2.1.3-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:

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

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.