4

Install RethinkDB on Ubuntu 20.04|18.04|16.04 & Debian 10|9

 2 years ago
source link: https://computingforgeeks.com/how-to-install-rethinkdb-on-ubuntu-debian/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Install RethinkDB on Ubuntu 20.04|18.04|16.04 & Debian 10|9

Hey folks!. Our blog guide for today is on how to Install RethinkDB on Ubuntu 20.04|18.04|16.04 & Debian 10|9 Linux system. RethinkDB is the leading Open-source, scalable database for building realtime web applications. It enables you to build amazing realtime applications with dramatically less engineering effort.

RethinkDB is a NoSQL database that stores schemaless JSON documents. It was 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.

Let’s now dive to the installation of RethinkDB on Ubuntu 20.04|18.04|16.04 & Debian 10|9 Linux system.

For CentOS: How To Install RethinkDB on CentOS 8 / CentOS 7

Install RethinkDB on Debian / Ubuntu

There is an official APT repository for both Debian and Ubuntu system where you can install RethinkDB packages from.

Add RethinkDB repository to your system using the commands below.

Add RethinkDB repository to Ubuntu

Add the repository to Ubuntu with the commands:

source /etc/lsb-release && echo "deb https://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -

Add RethinkDB repository to Debian

On your Debian machine, add RethinkDB repository with the command:

echo "deb https://download.rethinkdb.com/apt `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -

Install RethinkDB

After adding the repository, update APT cache and install RethinkDB on your Ubuntu / Debian machine.

sudo apt update
sudo apt -y install rethinkdb

Configuring RethinkDB on Ubuntu / Debian

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 vim /etc/rethinkdb/instances.d/instance1.conf

Examples:

Enable http admin console.

...............
### 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

Restart systemd service.

$ sudo systemctl restart rethinkdb.service 
$ systemctl status rethinkdb.service
● rethinkdb.service - LSB: This starts a set of rethinkdb server instances.
Loaded: loaded (/etc/init.d/rethinkdb; generated)
Active: active (running) since Mon 2019-04-22 10:08:23 CEST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 23585 ExecStop=/etc/init.d/rethinkdb stop (code=exited, status=0/SUCCESS)
Process: 23713 ExecStart=/etc/init.d/rethinkdb start (code=exited, status=0/SUCCESS)
Tasks: 74 (limit: 4915)
CGroup: /system.slice/rethinkdb.service
├─23840 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethinkdb --p
├─23842 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethinkdb --p
└─23919 /usr/bin/rethinkdb --daemon --config-file /etc/rethinkdb/instances.d/instance1.conf --runuser rethinkdb --rungroup rethinkdb --p
Apr 22 10:08:23 ubuntu2 systemd[1]: Starting LSB: This starts a set of rethinkdb server instances….
Apr 22 10:08:23 ubuntu2 rethinkdb[23713]: rethinkdb: instance1: Starting instance. (logging to `/var/lib/rethinkdb/instance1/data/log_file')
Apr 22 10:08:23 ubuntu2 rethinkdb[23713]: Recursively removing directory /var/lib/rethinkdb/instance1/data/tmp
Apr 22 10:08:23 ubuntu2 systemd[1]: Started LSB: This starts a set of rethinkdb server instances..

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

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.

Read the documentation guides to learn how to manage and administer RethinkDB like a ninja!.

Best MySQL Study books:

  • Getting Started With SQL – A Hands-On Approach for Beginners – a simple, to-the-point introductory read that’ll touch on the practical implications of SQL. Here, a reader gets introduced concisely to all the basics of the language;
  • Head First SQL – Your Brain on SQL – A Learner’s Guide;
  • SQL Cookbook: Query Solutions and Database Techniques for Database Developers – a book is full of hacks and tips that can be applied in day-to-day database management;
  • Teach Yourself MS SQL Server – a fairly old book, yet, it covers all the aspects of SQL Server on a high level;
  • Effective SQL – an easy-to-read guide book that explores SQL features. Keep in mind that you might need some SQL knowledge to apply the ideas that have been laid out.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK