Installing and Using RethinkDB on Ubuntu

0
787

Here’s a short tutorial on how to install and use RethinkDB, the popular NoSQL database, on Ubuntu machines.

RethinkDB is an open source, free, distributed, and document based database server. This NoSQL database has been developed by Rethink, and can store JSON files with schemas that are dynamic. More importantly, real-time updates for query results can be pushed for applications to use. Since it is a distributed database, it is highly scalable. It has many automatic functions, making it a highly available database. As it is a popular database today, it is important that we learn how to use it.

Let’s start with how we can install and use it on our Ubuntu machines. First, to add the packages required to install RethinkDB to our updates, we need to run the following command, as shown in Figure 1.

Adding the packages to updates
Figure 1: Adding the packages to updates
source /etc/lsb-release && echo” deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main” | sudo tee /etc/apt/sources.list.d/rethinkdb.list

The following command adds it to our repositories (Figure 2):

Adding RethinkDB to our repositories
Figure 2: Adding RethinkDB to our repositories
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add -

After adding new repositories, our package manager has to be updated using the following command, as shown in Figure 3.

Updating package manager
Figure 3: Updating package manager
sudo apt update

Once this is done, we can install RethinkDB using the following command, as shown in Figure 4.

RethinkDB installation
Figure 4: RethinkDB installation
sudo apt-get install rethinkdb

After installation, we first need to start it by running the following command:

sudo systemctl start rethinkdb

To check if it has started properly, enter the following command, as shown in Figure 5:

Starting and checking the status of RethinkDB
Figure 5: Starting and checking the status of RethinkDB
sudo systemctl status rethinkdb

We can now start using it. To set it up, enter ‘rethinkdb’ on the terminal, as shown in Figure 6.

 Setting the RethinkDB server
Figure 6: Setting the RethinkDB server

To open up the database server, enter the IP address with port number 8080 on the browser, as shown in Figure 7.

Opening the RethinkDB UI on the browser
Figure 7: Opening the RethinkDB UI on the browser

RethinkDB can now be used as any NoSQL database. It’s great fun to explore it and use it to its fullest potential!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here