Friday, November 15, 2024
Google search engine
HomeData Modelling & AIHow To Install RethinkDB on CentOS 8 / CentOS 7

How To Install RethinkDB on CentOS 8 / CentOS 7

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

RethinkDB is designed with automatic failover and robust fault tolerance in mind. It exposes a new database access model instead of polling for changes, the developer can tell the database to continuously push updated query results to applications in realtime.

Below few steps will cover how you can install RethinkDB on CentOS 8 / CentOS 7 Linux. For Ubuntu / Debian Linux, we have a separate guide:

Install RethinkDB on CentOS 8 / CentOS 7

RethinkDB RPM packages are available in an RPM repository supported by RethinkDB development team. Let’s add RethinkDB repository to our system so we can easily install RethinkDB on CentOS 8 / CentOS 7 with yum|dnf package managers.

CentOS 8:

sudo tee /etc/yum.repos.d/rethinkdb.repo<<EOF 
[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
EOF

CentOS 7:

sudo tee /etc/yum.repos.d/rethinkdb.repo<<EOF 
[rethinkdb]
name=RethinkDB
enabled=1
baseurl=https://download.rethinkdb.com/repository/centos/7/x86_64/
gpgkey=https://download.rethinkdb.com/repository/raw/pubkey.gpg
gpgcheck=1
EOF

Install RethinkDB on CentOS 8 / CentOS 7

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

sudo yum -y install rethinkdb

Configuring RethinkDB on CentOS 8 / CentOS 7

Copy the sample configuration file and use the configuration file documentation as a guide to customize it. (If you don’t have the sample .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

Examples:

Enable http admin console and listen on any address.

### Network options
bind=all

### Web options

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

Set the name for 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/<name>/ (where <name> is the name of this file without the extension)
directory=/var/lib/rethinkdb/default

Set Log directory:

log-file=/var/log/rethinkdb

Set bind address – default is all

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

Create data & log directory /file:

sudo mkdir /var/lib/rethinkdb
sudo 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 rethinkdb service service.

sudo systemctl enable rethinkdb
sudo systemctl start 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 (running) since Sat 2022-05-28 17:57:39 UTC; 20s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5701 ExecStart=/etc/rc.d/init.d/rethinkdb start (code=exited, status=0/SUCCESS)
    Tasks: 71 (limit: 23654)
   Memory: 54.7M
   CGroup: /system.slice/rethinkdb.service
           ├─5817 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethinkdb --pid-file /var/run/rethinkdb/instance1/pid_file --dir>
           └─5818 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethinkdb --pid-file /var/run/rethinkdb/instance1/pid_file --dir>
lines 1-10/10 (END)

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

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

Access RethinkDB Web console on the Server IP and port 8080.

install rethinkdb centos 01

You can perform most database operations like add tables, check servers, view logs e.t.c from the web console.

install rethinkdb centos 02

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

install rethinkdb centos 03

You’re on your way to database bliss!. Check out the RethinkDB docs and ReQL API. The ten-minute guide will also help you learn how to use the client drivers, get more in-depth information on basic commands, and start writing real applications with RethinkDB.

Here are the quick links to official and third party drivers.

Also check our recommended books for learning MySQL:

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments