Rqlite: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "'''What:''' rqlite is a lightweight, distributed relational database built on SQLite. == Installation == === Linux and macOS === Check the official binaries: https://github....")
 
Line 10: Line 10:
'''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.
'''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 ===
==== Compilation ====
* as root
* as root
* install latest version of golang for ARMv6 architecture (https://golang.org/dl/):
* install latest version of golang for ARMv6 architecture (https://golang.org/dl/):
Line 17: Line 17:
  tar -C /usr/local -xzvf 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
  export PATH=$PATH:/usr/local/go/bin
* prepare build for rqlite
* prepare environment for building rqlite (as root or regular user)
  cd
  cd
  mkdir go
  mkdir go
  cd 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 <code>rqlite</code> and <code>rqlited</code> to <code>/usr/local/bin</code>.
== A simple 3 nodes cluster ==

Revision as of 14:24, 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