How to Install and Configure RethinkDB System on Ubuntu 16.04 | 18.04

RethinkDB provides a free, open source and scalable database system with realtime features that are suitable for web development and monitoring…

If you need a database management system with native multi-model and capabilities that makes building realtime apps easy, you may want to look at RethinkDB…

RethinkDB uses JSON to query documents using Python, Ruby, Node.js and many other languages right out of the box… Building your apps using the database system should make your job using its intuitive web UI..

This brief tutorial shows students and new users how to install RethinkDB on Ubuntu 16.04 | 18.04 LTS servers…

For more about RethinkDB, please visit its homepage.

If you want to test it in your lab environment before going out and using it in production, the steps below should be a great place to start..Follow the steps below to get RethinkDB installed on Ubuntu

Step 1: Install Required Packages

To get the latest version of RethinkDB, you can either use its .DEB file from its website or add its official repository to Ubuntu… However, some required packages may be needed for the installation to work…

First, run the commands below to install apt-transport-https

sudo apt update
sudo apt install apt-transport-https

After installing the package above, continue below to installing RethinkDB.

Step 2: Installing RethinkDB

Now that some required packages are installed, follow the steps below to get RethinkDB installed and configured… If you don’t want to manually install the RethinkDB from its .DEB file, then add RethinkDB’s official package repository to make installing and updating it easier…

To add RethinkDB repository and key, run the commands below.. The first line imports the repository’s GPG key… the second adds RethinkDB repository into a new file called rethinkdb.list

wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list

After the steps above, run the commands below to install it.

sudo apt update
sudo apt install rethinkdb

After installing the commands below can be used to stop, start and enable RethinkDB service…

sudo systemctl stop rethinkdb
sudo systemctl start rethinkdb
sudo systemctl enable rethinkdb

To verify that RethinkDB is installed and running, run the commands below check its status..

sudo systemctl status rethinkdb

You should see similar lines as shown below:

● rethinkdb.service - LSB: This starts a set of rethinkdb server instances.
   Loaded: loaded (/etc/init.d/rethinkdb; generated)
   Active: active (exited) since Tue 2019-04-23 12:03:50 CDT; 22s ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 4683)
   CGroup: /system.slice/rethinkdb.service

Apr 23 12:03:50 ubuntu1804 systemd[1]: Starting LSB: This starts a set of rethinkdb server instances....
Apr 23 12:03:50 ubuntu1804 rethinkdb[19021]: rethinkdb: No instances defined in /etc/rethinkdb/instances.d
Apr 23 12:03:50 ubuntu1804 rethinkdb[19021]: rethinkdb: See http://www.rethinkdb.com/docs/guides/startup/ 
Apr 23 12:03:50 ubuntu1804 systemd[1]: Started LSB: This starts a set of rethinkdb server instances..

That should do it!

Installing RethinkDB from Source

If RethinkDB’s repository doesn’t have packages for your system just yet, you may want to manually install it from source… At this time of this writing, Ubuntu 18.04 wasn’t supported…

So, to install RethinkDB from source, run the commands below to install required packages for building the app…

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

Next, run the commands below to download its archived that includes version 2.3.6

cd /tmp
wget https://download.rethinkdb.com/dist/rethinkdb-2.3.6.tgz
tar xf rethinkdb-2.3.6.tgz

After extracting the downloaded archive, change into the directory and install…

cd rethinkdb-2.3.6
./configure --allow-fetch
make
sudo make install

That should install RethinkDB on your system..

After installing, run the commands below to quickly configure it…

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

Then enable the default HTTP port number when the file opens,

## r.http(...) queries will use the given server as a web proxy
### Web options
## Port for the http admin console
## Default: 8080 + port-offset
 http-port=8080

## Disable web administration console
# no-http-admin

Save the file and exit.

After that, use the commands below to start, stop and restart…

sudo /etc/init.d/rethinkdb stop
sudo /etc/init.d/rethinkdb start
sudo /etc/init.d/rethinkdb restart

Step 3: Accessing RethinkDB Web Interface

RethinkDB also comes with a web interface for easy management in your web browser… To logon, go the server’s IP address followed by port # 8080

http://127.0..0.1:8080

RethinkDB Ubuntu Install

Enjoy!

Congratulations! You have successfully installed RethinkDB on Ubuntu 16.04 and 18.05

You may also like the post below:

How to Setup WordPress with Nginx and Cloudflare CDN / SSL on Ubuntu 16.04 / 18.04

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.