Skip to content

themattman/mongodb-raspberrypi-binaries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial MongoDB Community Edition Binaries for Raspberry Pi

Overview

These are a best-effort attempt to create binaries of the MongoDB Community Edition Server for the Raspberry Pi ecosystem. MongoDB Inc does not officially support these binaries.

Motivation

Time-Series Collections are a relatively new MongoDB feature that provide a meaningful improvement for common embedded workloads, like sensor aggregation on a Raspberry Pi. Prior to this repo, users were required to build from source.

Docker Support?

The binaries from this repo are packaged in a Docker container here.

Pi Support

  • Raspberry Pi 5: Tested on real hardware. Beginning with r7.0.3 and r6.0.12. Moving forward, I would recommend using the official MongoDB binaries as they are officially supported.
  • Raspberry Pi 4B (BCM2835): I have this running on real hardware with an uptime greater than one year.
  • Raspberry Pi 3B: Report of the binaries working here: issues/23 (thanks @baslking)

Notes

MongoDB officially requires ARMv8.2-A+ microarchitecture support as of MongoDB 5.0+. The Raspberry Pi 4 runs on ARMv8.0-A. These binaries are a best-effort at preserving functionality below minimum hardware specs. For further digging, see WT-9256 for understanding the risks of running MongoDB 5.0+ on a Pi 4 (i.e. an ARM CPU without Large System Extensions (LSE) atomics).

However, the Raspberry Pi 5 does meet the minimum hardware requirements with its newer CPU and I would encourage users to seek the MongoDB official binaries for ARM that are compatible with the Pi 5.

The binaries in this repo are subject to the MongoDB Server-Side Public License.

Releases

- r6.1.0-rc4 [October 3, 2022] Not recommended to run release candidates. This was the first release I built.

Installing on Raspberry Pi

  • Ensure Raspberry Pi meets minimum HW requirements. I have only installed on a 4GB/8GB Raspberry Pi 4 & 8GB Raspberry Pi 5.

  • Ensure a 64-bit Raspberry Pi OS has been installed on the Pi, I use debian 11.

    • Raspbian is 32-bit by default for maximum compatibility.
# Using wget assumes network connection. Can also copy with USB.
$ mkdir ~/mdb-binaries && cd ~/mdb-binaries
$ wget https://github.com/themattman/mongodb-raspberrypi-binaries/releases/download/r7.0.28-rpi-unofficial/mongodb.ce.pi4.r7.0.28.tar.gz
$ tar xzvf mongodb.ce.pi4.r7.0.28.tar.gz # Decompress tarball

# Prepare MongoDB data & log directories
$ mkdir -p /data/db/test_db
$ touch /data/db/test_db/mongod.log
$ sudo chown -R ${USER}:${USER} /data

# Run & Configure MongoDB Standalone Local Server
$ ./mongod --dbpath /data/db/test_db --fork --logpath /data/db/test_db/mongod.log --port 28080
$ ./mongo --port 28080 # run queries!

Bugs / Requests

File an issue on Github. Please include:

  • hardware details
$ cat proc/cpuinfo | grep -E "(Hardware|Revision|Model)"
  • Operating System details
$ lsb_release -a
  • steps you've tried

  • error output

  • general feedback

About

Unofficial MongoDB Community Edition Binaries for Raspberry Pi

Resources

License

Stars

Watchers

Forks

Packages

No packages published