How to install RethinkDB database system on Debian 10

How to install RethinkDB database system on Debian 10

RethinkDB is a free and open source NoSQL database system that makes it easier to build real-time applications. It comes with a graphical user interface that can be accessed from a web browser and used to manage the database. It uses JSON to load the application into the database and read the database. RethinkDB is used to store JSON documents, and you can easily extend it to multiple computers. It is easy to set up and has a simple query language that supports table joins and grouping by.

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

prerequisites

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

getting Started

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

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

After the system is updated, restart to implement the changes.

Install RethinkDB

RethinkDB is not available in the Debian 10 default repository by default. Therefore, you need to add RethinkDB to your system.

First, download and add the GPG key using 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

After adding the repository, update the repository and install RethinkDB using the following command:

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

After installation is complete, start the RethinkDB service and use the following command to start it after the system restarts:

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 the RethinkDB service using 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 using 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:

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 has been configured to be accessed from a web browser.

Access RethinkDB web interface

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

From here, you can easily create and manage databases and clusters.

Install RethinkDB from source

If RethinkDB’s repository does not support your operating system, you can manually install it from source.

You will need to install the required dependencies to install RethinkDB from source.

You can use the following command to install all required dependencies:

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 dependencies, download the latest version of RethinkDB using the following command:

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

After downloading, use the following command to unzip the downloaded file:

tar -xvzf rethinkdb-2.4.0.tgz

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

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

Finally, install it using:

make make install

After the installation is successfully completed, you can start the RethinkDB service using the following command:

/etc/init.d/rethinkdb start

in conclusion

In the above tutorial, we learned how to install RethinkDB using APT and compile from source code. Now you can start researching and exploring RethinkDB to understand how it works. If you have any questions, feel free to ask me.

Source

Sidebar