Rqlite: Difference between revisions

From XPUB & Lens-Based wiki
Line 34: Line 34:
That's it!
That's it!


=== Installation on other nodes ===
==== Installation on other nodes ====


You just need to copy the binaries <code>rqlite</code> and <code>rqlited</code> to <code>/usr/local/bin</code>.
You just need to copy the binaries <code>rqlite</code> and <code>rqlited</code> to <code>/usr/local/bin</code>.


== A simple 3 nodes cluster ==
== A simple 3 nodes cluster ==

Revision as of 14:25, 29 May 2018

What: rqlite is a lightweight, distributed relational database built on SQLite.

Installation

Linux and macOS

Check the official binaries: https://github.com/rqlite/rqlite/releases

Installation on Raspberry Pi

Note: There are no rqlite binaries for the RPi, however it is possible to compile it quite easily. You only need to compile it on *one* RPi, after that you can simply copy the resulting binaries to other RPis of your cluster.

Compilation

cd /usr/src
wget https://dl.google.com/go/go1.10.2.linux-armv6l.tar.gz
tar -C /usr/local -xzvf go1.10.2.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
  • prepare environment for building rqlite (as root or regular user)
cd
mkdir go
cd go
mkdir bin pkg src
export GOPATH=$PWD
  • build rqlite (this will take a while, monitor with (h)top if you like)
go get -u -t github.com/rqlite/rqlite/...   # yes you need the '...' at the end
cd $GOPATH/src/github.com/rqlite/rqlite/cmd/rqlite
go build -v .
sudo cp rqlite /usr/local/bin
cd $GOPATH/src/github.com/rqlite/rqlite/cmd/rqlited
go build -v .
cp rqlited /usr/local/bin

That's it!

Installation on other nodes

You just need to copy the binaries rqlite and rqlited to /usr/local/bin.

A simple 3 nodes cluster