Install RethinkDB Realtime Database on RHEL / CentOS 7 & 8

Last modified on May 30, 2020 1 min read

RethinkDB stores JSON documents with dynamic schemas and is designed to facilitate pushing real-time updates for query results to applications. Today I’m going to share how to setup RethinkDB on RHEL / CentOS.

Table of Contents

  1. Install RethinkDB
  2. Configuration
  3. Config Firewall & Test
  4. Run RethinkDB

Install RethinkDB

Let’s add RethinkDB repository provided by RethinkDB team:

# RHEL/CentOS 8
sudo wget`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

# RHEL/CentOS 7
sudo wget`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

After adding the repository, we can install RethinkDB using yum or dnf package manager.

sudo yum -y install rethinkdb


You can read their configuration file documentation. Let’s create an instance of rethinkdb:

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

If you don’t have the sample .conf file, you can download it from here. Now we have to customize the instance1.conf. Open instance1.conf file:

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

Comment out these lines:


Then set permissions:

sudo chown -R rethinkdb:rethinkdb  /var/log/rethinkdb /var/lib/rethinkdb

sudo chmod -R 775 /var/log/rethinkdb /var/lib/rethinkdb

Config Firewall & Test

If firewall is active on your server, you need to open 8080 on port.

# open http port
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

# open driver port
sudo firewall-cmd --zone=public --add-port=28015/tcp --permanent

# reload firewall
sudo firewall-cmd --reload

Now run this command to enable run RethinkDB on port 8080.

rethinkdb --bind all

Visit http://[server-ip-address]:8080 to see the web interface of RethinkDB.

Now stop exist from RethinkDB console and stop:

# exit
Ctrl + C

# stop
sudo /etc/init.d/rethinkdb stop

Run RethinkDB

Enable RethinkDB on start:

sudo systemctl enable --now rethinkdb

Start RethinkDB:

sudo systemctl start rethinkdb

Check status:

sudo systemctl status rethinkdb

Again visit http://[server-ip-address]:8080 to see the web interface of RethinkDB. You’ll see the screen like this:

Done. RethinkDB is running and available to use. Thank you. 🙂

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development.