Installing RethinkDB

Written by Ulises Avila
in rethinkdb at 15 September 2018

Introduction

RethinkDB is a database engine of the family of schemaless NoSQL systems. It is known as the database for the real time web because it lets you suscribe to a feed of data, so every time you make a change to the database you get as result a cursor with the new data. It uses JSON data to store information like MongoDB.

In this tutorial you will install RethinkDB in one of your servers.

Requirements

Have one server with any of the following OS: Centos, Debian, Fedora, Ubuntu.

Installation

RethinkDB is not in the official repos of the distros listed in the last part. So you must add the repo for the matching platform you are using. Keep in mind that you can build it form source and then install it, but it can become burdensome in the long run.

Centos

To add the repo in Centos just copy and paste the next command, watch OS_VERSION because it must match the version of Centos you are using. Currently the supported versions are 6 and 7:

sudo wget http://download.rethinkdb.com/centos/OS_VERSION/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

Then you can install it with yum:

sudo yum install rethinkdb

Debian

For Debian be sure to use Wheezy or Jessie distros because the binaries are built for them. Then you can execute both commands:

echo "deb http://download.rethinkdb.com/apt `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -

Then update your repos and install the package:

sudo apt-get update && apt-get install rethinkdb

Fedora

There is not official package built for Fedora, but the Centos package works fine, it is recommended to use the Centos 6 repo:

sudo wget http://download.rethinkdb.com/centos/6/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

Now use yum afterwards:

sudo yum install rethinkdb

Ubuntu

You can install RethinkDB in Ubuntu as long as your system version is 12.04 or older. As in the Debian version execute both commands:

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -

And finally update repos and install the package:

sudo apt-get update && apt-get install rethinkdb

Starting up the server

Almost all your admin tasks will be done over a web panel, to access it you just go to localhost:8080, but RethinkDB does not start automatically after installation. You have to start it using rethinkdb and you will have the session open in you command line. You can expose it to all network traffic with the rethinkdb --bind all, in this way you can access it from your remote host, but keep in mind that this is insecure because the panel would be open to the internet.

Follow up

Installing RethinkDB is just as easy as booting up a distro, starting up the service is easy too. But this service is not persistent, after this tutorial you should go and read how to configure a systemd unit service to enable and start a RethinkDB installation.