Installing on
FreeBSD

You can install Riak on FreeBSD for the AMD64 architecture with a binary package or by building from source code.

Installing From Binary Package

Note: The Riak 1.2 binary package is supported on FreeBSD version 9. Users have reported success building Riak from source on a number of FreeBSD versions, however.

Installing Riak from a binary package is the simplest method with least required dependencies, and requires less time to complete than building from source.

Prerequisites and Dependencies

Riak depends on sudo to be installed if the Riak command line tools are to be executed by users other than the riak user. Please ensure that sudo is installed via packages or the ports collection prior to installing the Riak package.

The Riak binary package also depends on a packaged version of OpenSSL. Prior to installing Riak 1.2 on FreeBSD 9, you’ll need to install openssl-1.0.0_7 either from package or the ports collection.

Installation

You can install the Riak binary package on FreeBSD remotely using the
pkg_add remote option. For this example, we’re installing riak-2.2.3-FreeBSD-amd64.tbz.

When Riak is installed, a message is displayed with information about the installation and available documentation.

Thank you for installing Riak.
Riak has been installed in /usr/local owned by user:group riak:riak
The primary directories are:
{platform_bin_dir, "/usr/local/sbin"}
{platform_data_dir, "/var/db/riak"}
{platform_etc_dir, "/usr/local/etc/riak"}
{platform_lib_dir, "/usr/local/lib/riak"}
{platform_log_dir, "/var/log/riak"}
These can be configured and changed in the platform_etc_dir/app.config.
Add /usr/local/sbin to your path to run the riak and riak-admin scripts directly.
Man pages are available for riak(1) and riak-admin(1)

If instead of this message, you receive an error during installation regarding OpenSSL, similar to this one:

Be sure that you’ve installed the required OpenSSL version from packages or the ports collection as described in the Prerequisites and Dependencies section.

Installing From Source

Installing Riak from source on FreeBSD is a straightforward process which requires installation of more dependencies (such as Erlang) prior to building, and requires more time than a binary package installation.

That said, installing from source provides for greater flexibility with respect to configuration, data root locations, and more fine grained control over specific dependency versions.

Prerequisites and Dependencies

When building and installing Riak from source, you might be required to install some prerequisite software before proceeding with the build.

If you do not currently have the following software installed, please install it with packages or the ports collection before proceeding.