4

I'm looking for noSQL db for Rapsberry pi. I've tried MongoDB which is really terrible to install on Pi. 3+ version is not run on Pi (because it needs 64 bit version, and Pi is only 32). Older versions (2<) give a list of errors and problems during installation.

I'd like to use noSQL and I do not have a few hours to install it...

Are there a more comfortable kind of noSQL system which is absolutely compatible with Pi?

Thank you in advance!

Wadkan
  • 87
  • 2
  • 6

2 Answers2

2

I'm not yet an expert on NoSQL, but I am also blessed with a 32-bit Raspbian and therefore can not use MongoDB (except for Atlas - i.e. running the DB on somebody else's machine instead of your Pi: https://www.mongodb.com/try).

Introduction

First of all, there are different flavours of NoSQL: document, key-value, wide column etc. This means that Redis is not a drop-in replacement for Mongo - it's a different approach, which may be better at some things and worse at other. There is the issue of CAP Theorem.

I first thought I might build MongoDB from source on the Raspberry, but it needs some 13 GB of free storage (and 600 GB for "install all"), so I'm not trying to build it. The sources are only some 100 MB, so I'd have to wait for GCC to emit 12.9 GB of object code on the BCM2835 - this would last forever. (and you need GCC 8.2 and my Raspian has only 6.3... C++17).

One Document DB option

If you want some similarity to Mongo, you can look at Couch DB (and relax). Here is a prescription to build it: https://github.com/jguillod/couchdb-on-raspberry-pi

It can be even a bit simpler than that, after your system is fully updated:

sudo apt install --no-install-recommends -y build-essential pkg-config erlang libicu-dev libmozjs185-dev libcurl4-openssl-dev
# download apache-couchdb-2.3.1.tar.gz
# from: http://couchdb.apache.org/#download
# click the version for direct mirror URL
tar xf apache-couchdb-2.3.1.tar.gz
cd apache-couchdb-2.3.1
./configure
make release

(The 3.x version didn't want to build properly - i.e. the ./configure ran quick, but make produced nothing...).

This is already a working build of CouchDB, you can run it with:

./rel/couchdb/bin/couchdb

But it's better to e.g. create a separate user for Couch, and run it as a systemd service, etc. (Configure a password, put it behind an SSL-enabled reverse proxy, and all).

Tomasz Gandor
  • 8,235
  • 2
  • 60
  • 55
1

You can compile Redis as 32-bit.

To compile Redis as 32 bit binary use ’make 32bit’

https://redis.io/topics/memory-optimization

Aleksey Tsalolikhin
  • 1,518
  • 7
  • 14