There is a new version of this tutorial available for Debian 11 (Bullseye).

How to Install RethinkDB Database System on Debian 10

RethinkDB is a free and open-source NoSQL database system that makes it easier for building realtime apps. It comes with a graphical user interface that can be accessible from the web browser and used to manage the database. It uses JSON to load the applications into and read the database. RethinkDB is built to store JSON documents and you can scale it to multiple machines easily. It is easy to set up and has a simple query language that supports table joins and group by.

In this tutorial, we will show you how to install the RethinkDB database management system on Debian 10 server.

Prerequisites

  • A server running Debian 10.
  • A root password is configured on your server.

Getting Started

Before starting, it is recommended to update your system to the latest version. You can run the following command to update your system.

apt-get update -y
apt-get upgrade -y

Once your system is updated, restart it to implement the changes.

Install RethinkDB

By default, RethinkDB is not available in the Debian 10 default repository. So you will need to add the RethinkDB to your system.

First, download and add the GPG key with the following command:

wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -

Next, add the RethinkDB repository using the following command:

echo "deb https://download.rethinkdb.com/apt buster main" | tee /etc/apt/sources.list.d/rethinkdb.list

Once the repository is added, update the repository and install the RethinkDB with the following command:

apt-get update -y
apt-get install rethinkdb -y

Once the installation is completed, start the RethinkDB service and enable it to start after system reboot with the following command:

systemctl start rethinkdb
systemctl enable rethinkdb

You should see the following output:

rethinkdb.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable rethinkdb

You can also check the status of RethinkDB service with the following command:

systemctl status rethinkdb

You should get the following output:

? rethinkdb.service - LSB: This starts a set of rethinkdb server instances.
   Loaded: loaded (/etc/init.d/rethinkdb; generated)
   Active: active (exited) since Wed 2020-01-22 08:38:37 UTC; 1min 18s ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 2359)
   Memory: 0B
   CGroup: /system.slice/rethinkdb.service

Jan 22 08:38:37 debian10 systemd[1]: Starting LSB: This starts a set of rethinkdb server instances....
Jan 22 08:38:37 debian10 rethinkdb[10189]: rethinkdb: No instances defined in /etc/rethinkdb/instances.d/
Jan 22 08:38:37 debian10 rethinkdb[10189]: rethinkdb: See http://www.rethinkdb.com/docs/guides/startup/ for more information
Jan 22 08:38:37 debian10 systemd[1]: Started LSB: This starts a set of rethinkdb server instances..

At this point, RethinkDB is installed and running. You can now proceed to the next step.

Configure RethinkDB

First, copy the RethinkDB sample configuration file with the following command:

cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf

Next, you will need to modify this configuration file to enable the RethinkDB web interface. You can edit it with the following command:

nano /etc/rethinkdb/instances.d/instance1.conf

Change the following lines:

## Port for the RethinkDB web interface
http-port=8080
## Allow RethinkDB to accessible from the remote system.
bind=0.0.0.0
## The name of the server
server-name=server1
## Default directory to store data and metadata.
directory=/var/lib/rethinkdb/default

Save and close the file when you are finished. Then, restart the RethinkDB service to implement the changes:

systemctl restart rethinkdb

At this point, RethinkDB is configured to access from the web browser.

Access RethinkDB Web Interface

Open your web browser and type the URL http://your-server-ip:8080. You will be redirected to the RethinkDB default dashboard as shown below:

RethinkDB Dashboard

From here, you can easily create and manage the database and cluster.

Install RethinkDB from Source

If RethinkDB’s repository doesn’t support for your operating system, you can manually install it from the source.

You will need to install required dependencies in order to install RethinkDB from source.

You can install all the required dependencies with the following command:

apt-get install build-essential protobuf-compiler python curl libprotobuf-dev libcurl4-openssl-dev libboost-all-dev libncurses5-dev libjemalloc-dev wget m4 -y

After installing all the dependencies, download the latest version of the RethinkDB with the following command:

wget https://download.rethinkdb.com/dist/rethinkdb-2.4.0.tgz

Once downloaded, extract the downloaded file with the following command:

tar -xvzf rethinkdb-2.4.0.tgz

Next, change the directory to the rethinkdb-2.4.0 and configure it with the following command:

cd rethinkdb-2.4.0
./configure --allow-fetch

Finally, install it with the following command:

make
make install

Once the installation has been completed successfully, you can start the RethinkDB service with the following command:

/etc/init.d/rethinkdb start

Conclusion

In the above tutorial, we learned how to install RethinkDB with APT and compile it from the source. You can now start working on RethinkDB and exploring it to get an idea on how it works. Feel free to ask me if you have any questions.

Share this page:

1 Comment(s)