Install RethinkDB Realtime Database on RHEL / CentOS 7 & 8
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
Install RethinkDB
Let’s add RethinkDB repository provided by RethinkDB team:
# RHEL/CentOS 8
sudo wget https://download.rethinkdb.com/centos/8/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo
# RHEL/CentOS 7
sudo wget https://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repoAfter adding the repository, we can install RethinkDB using yum or dnf package manager.
sudo yum -y install rethinkdbConfiguration
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.confIf 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.confComment out these lines:
runuser=rethinkdb
rungroup=rethinkdb
directory=/var/lib/rethinkdb/default
log-file=/var/log/rethinkdb
bind=all
driver-port=28015
http-port=8080
server-name=server1Then set permissions:
sudo chown -R rethinkdb:rethinkdb /var/log/rethinkdb /var/lib/rethinkdb
sudo chmod -R 775 /var/log/rethinkdb /var/lib/rethinkdbConfig 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 --reloadNow run this command to enable run RethinkDB on port 8080.
rethinkdb --bind allVisit 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 stopRun RethinkDB
Enable RethinkDB on start:
sudo systemctl enable --now rethinkdbStart RethinkDB:
sudo systemctl start rethinkdbCheck status:
sudo systemctl status rethinkdbAgain visit http://[server-ip-address]:8080 to see the web interface of RethinkDB. You’ll see the screen like this:

Md Obydullah
Software Engineer | Ethical Hacker & Cybersecurity...
Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.