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

Author

Programster

Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus