RethinkDB is a powerful No-SQL database management system specially designed for applications requiring continuous data access. It supports many popular languages, including PHP, Java, Ruby, and Python. You can use it for automatic failover and robust fault tolerance. RethinkDB has very minimal response times and updates. In addition, it has a beautiful and user-friendly web interface that allows you to manage databases over the web.
This tutorial will show you how to install RethinkDB on Oracle Linux 8.
Step 1 – Install RethinkDB
By default, RethinkDB is not available in the Oracle Linux 8 default repository, so you will need to create a repo for RethinkDB. You can make it with the following command:
nano /etc/yum.repos.d/rethinkdb.repo
Add the following lines:
[rethinkdb] name=RethinkDB enabled=1 baseurl=https://download.rethinkdb.com/repository/rocky/8/x86_64/ gpgkey=https://download.rethinkdb.com/repository/raw/pubkey.gpg gpgcheck=1
dnf install rethinkdb -y
Once the RethinkDB is installed, you can verify the RethinkDB version with the following command:
rethinkdb --version
You should get the following output:
rethinkdb 2.4.2 (GCC 8.5.0)
Step 2 – Configure RethinkDB
First, you will need to copy the RethinkDB sample configuration file with the following command:
cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
Next, edit the configuration file using the following command:
nano /etc/rethinkdb/instances.d/instance1.conf
Then, change the following lines to enable the RethinkDB web console:
http-port=8080 server-name=server1 directory=/var/lib/rethinkdb/default log-file=/var/log/rethinkdb bind=0.0.0.0
Save and close the file when you are finished. Next, create the necessary files and provide proper permissions with the following command:
touch /var/log/rethinkdb chown -R rethinkdb:rethinkdb /var/log/rethinkdb /var/lib/rethinkdb chmod -R 775 /var/log/rethinkdb /var/lib/rethinkdb
Now, start the RethinkDB service and enable it to start at system reboot with the following command:
systemctl enable --now rethinkdb systemctl start rethinkdb
Finally, you can directly verify the status of the RethinkDB service with 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/rc.d/init.d/rethinkdb; generated) Active: active (running) since Fri 2022-09-16 05:06:25 EDT; 4s ago Docs: man:systemd-sysv-generator(8) Process: 173795 ExecStart=/etc/rc.d/init.d/rethinkdb start (code=exited, status=0/SUCCESS) Tasks: 71 (limit: 23694) Memory: 21.7M CGroup: /system.slice/rethinkdb.service ├─173906 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethin> └─173907 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethin> Sep 16 05:06:24 email.linuxbuz.com systemd[1]: Starting LSB: This starts a set of rethinkdb server instances.... Sep 16 05:06:24 email.linuxbuz.com rethinkdb[173795]: rethinkdb: instance1: Starting instance. (logging to `/var/log/rethinkdb') Sep 16 05:06:25 email.linuxbuz.com rethinkdb[173795]: Recursively removing directory /var/lib/rethinkdb/default/tmp Sep 16 05:06:25 email.linuxbuz.com systemd[1]: Started LSB: This starts a set of rethinkdb server instances..
At this point, RethinkDB is started and listening on port 8080. You can check it with the following command:
ss -antpl | grep 8080
You should get the following output:
LISTEN 0 128 *:8080 *:* users:(("rethinkdb",pid=173906,fd=25))
Step 3 – Access RethinkDB Web Interface
Now, open your web browser and access the RethinkDB using the URL http://your-server-ip:8080. You should see the following page:
Now, click on the Tables button. You should see the following page:
Click on the Add Database button. You should see the following page:
Provide your database name and click on the Add button. You should see your database on the next page:
Conclusion
This post explained how to install RethinkDB on Oracle Linux 8. You can now use RethinkDB with your application and manage it over the web. For more information, visit the RethinkDB official documentation. Give it a try today on VPS hosting from Atlantic.Net!