Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 8 - Install RethinkDB

What is RethinkDB

RethinkDB is a new database which is:

  • opensource
  • JSON documents based.
  • Easily scaled and distributed across multiple nodes.
  • Queries are automatically parallelized.
  • Simple administration tools, with a web UI (shown below)

The reason I'm interested in RethinkDB is because of it's simple and clear documentation, its ability to easily scale, and its geospatial query capabilities.

Installation

Installation is a breeze and takes less than 5 minutes. The easiest way to install RethinkDB on Debian is by adding the apt repository which also allows us to update easily.

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

You can also build RethinkDB from source if you like.

To start the database, normally you would run:

rethinkdb

However, we want to be able to connect to the database remotely, so we are going to set the database to bind to all network interfaces instead of just localhost.

rethinkdb --bind all

RethinkDB binds to just localhost by default for security. If you change this, you may need to look into securing the database.

Now you can administer the server by navigating to the server's IP in your browser, on port 8080. For example

rethink-db.programster.org:8080

Next Time

Next time, we will look into connecting PHP to our new database.

References

Last updated: 16th August 2018
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch