How to install RethinkDB on CentOS 8 / CentOS 7

Welcome to our guide to installing RethinkDB on CentOS 8 / CentOS 7 Linux. RethinkDB is a highly scalable open source NoSQL database server for building real-time web applications with less engineering effort.

RethinkDB was designed with automatic failover and strong fault tolerance in mind. It exposes a new database access model instead of Polling for changesDevelopers can tell the database Constantly push updated query results Real-time application.

The following steps will explain how to install RethinkDB on CentOS 8 / CentOS 7 Linux. For Ubuntu / Debian Linux, we have separate guides:

Install RethinkDB on Ubuntu and Debian

Install RethinkDB on CentOS 8 / CentOS 7

The RethinkDB RPM package can be found in the RPM repository supported by the RethinkDB development team. Let’s add the RethinkDB repository to our system so that we can easily install RethinkDB on CentOS 8 / CentOS 7 using the yum | dnf package manager.

CentOS 8:

sudo dnf -y install wget
sudo wget https://download.rethinkdb.com/centos/8/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

CentOS 7:

sudo yum -y install wget
sudo wget https://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo

Install RethinkDB on CentOS 8 / CentOS 7

After adding the repository, install RethinkDB on CentOS 8 / CentOS 7 using the following command:

sudo yum -y install rethinkdb

Configure RethinkDB on CentOS 8 / CentOS 7

Copy the sample configuration file and use Configuration file Documentation as a custom guide. (If you do n’t have samples .conf File you can download it Here)

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

example:

Enable the http management console.

...............
### Web options

## Port for the http admin console
## Default: 8080 + port-offset
http-port=8080

Set the name of the server.

......
### Meta

## The name for this server (as will appear in the metadata).
## If not specified, it will be randomly chosen from a short list of names.
server-name=server1

The default data directory is /var/lib/rethinkdb/ But you can change it.

.....................
### File path options

## Directory to store data and metadata
## Command line default: ./rethinkdb_data
## Init script default: /var/lib/rethinkdb// (where  is the name of this file without the extension)
directory=/var/lib/rethinkdb/default

Set the log directory:

log-file=/var/log/rethinkdb

Set bind address-default is 127.0.0.1

bind=127.0.0.1
# bind=all           # Bind to all addresses
# bind=192.168.10.10 # Bind to specific ip address

Create data and log directories / files:

sudo mkdir /var/lib/rethinkdb
touch /var/log/rethinkdb

Set proper permissions

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

Start and enable the rethinkdb service service.

sudo systemctl enable --now rethinkdb

Confirm service status:

$ systemctl status rethinkdb
● rethinkdb.service - LSB: This starts a set of rethinkdb server instances.
   Loaded: loaded (/etc/rc.d/init.d/rethinkdb; generated)
   Active: active (exited) since Thu 2020-01-16 13:57:33 CET; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2499 ExecStart=/etc/rc.d/init.d/rethinkdb start (code=exited, status=0/SUCCESS)

Jan 16 13:57:33 cent8 systemd[1]: Starting LSB: This starts a set of rethinkdb server instances....
Jan 16 13:57:33 cent8 rethinkdb[2499]: rethinkdb: instance1: The instance has already started
Jan 16 13:57:33 cent8 systemd[1]: Started LSB: This starts a set of rethinkdb server instances..

If you have an active firewall service, allow port 8080:

sudo firewall-cmd --add-port=8080/tcp --permanent
sudo firewall-cmd --reload

Access the RethinkDB web console on the server IP and port 8080.

You can perform most database operations through the web console, such as adding tables, checking servers, viewing logs, and more.

How to install RethinkDB on CentOS 8 / CentOS 7

A list of servers added to the cluster can be viewed under the Servers section.

How to install RethinkDB on CentOS 8 / CentOS 7

You are moving towards database happiness! Take a look RethinkDB documentation with ReQL API. of Ten minute guide It will also help you learn how to use client drivers, get more in-depth information on basic commands, and start writing actual applications with RethinkDB.

This is a quick link with official and third-party drivers.

Also check out our recommended books on learning MySQL:

  • Getting started with SQL
    Beginner-oriented hands-on approach-simple and practical
    The introductory reading will cover the actual meaning of SQL.
    Here, the reader is briefly introduced to all the basics.
    Language;
  • Head First SQL – Your SQL knowledge – study guide;
  • SQL Cookbook: Query Solutions and Databases Techniques for database developers-a book containing many tips and tricks for daily database management;
  • Self-learning MS SQL Server – A rather old book that covers all aspects of SQL Server from a high level;
  • Effective SQL
    An easy-to-read guide that explores SQL features. remember
    You may need some SQL knowledge to apply existing ideas
    Layout.
Sidebar