MongoDB 3.2 (64 bit) running on Raspberry Pi 3 – with caveats

Add Comment

Debian buster + MongoDB for Raspberry Pi 3

I’ve been asked multiple times if MongoDB 3.2 (or greater) can run on a Raspberry Pi.  The answer has always been “no” — as you need a 64-bit OS to run versions >= 3.2.  Some 64-bit Linux OS’s are starting to become available for R-Pi that, in theory, could run 64-bit MongoDB.  I finally found a configuration that was easy to install and use.  I now have MongoDB 3.2.17 running under Debian buster on a Raspberry Pi 3 — with caveats 😉

The Debian buster release for Raspberry Pi 3 is NOT yet an official image. The hardware still needs the non-free R-Pi firmware to boot. NOTE: this image will NOT work for the new R-Pi 3B+.  There are not a lot of apps available that currently run under buster.  My install is strictly terminal based — or headless (via ssh).  The MongoDB utilities are NOT yet ported.  You can run “mongod”, “mongos” and the “mongo” shell but you’ll need to run utilities such as “mongodump” and “mongorestore” from another computer.

Here is the how-to:

  • get and install the Debian buster image on a microSD Card
  • boot the R-Pi 3 under Debian buster
  • update the OS via “update” and “upgrade”
  • install MongoDB via “apt-get install”
  • configure memory and swap
  • test out your configuration
  • put data into MongoDB database(s)
  • enjoy!

Detailed instructions after the break…

More

Replace that tennis ball with a talking Raspberry Pi!

2 Comments

The challenge is not to hit the ladder while parking

Our garage has a ladder sticking out near where we park our car.  We want to park close to the ladder leaving enough room to walk in front of the car and also allow room behind the car for the garage door to close. A typical solution to this need, and one we’ve used in the past, is to have a tennis ball on a string positioned such that the car window nudges the ball and shakes the string — so you know when to stop.  A great analog solution!  I, however, desired a digital solution that incorporates a Raspberry Pi.

This parking-assist solution doesn’t “speak” to me!

OK, a digital solution should either have a sensor that is tripped by the car or, even better, something that could dynamically measure and show the distance from the car to the ladder.  This would require some way to provide feedback to the driver.   Hmmmm, feedback could be visual or maybe via sound.  Yes,  that’s it!  I could have an R-Pi measure the distance and “talk” to the car driver.  Another project is born 😎

 

More

CouchDB 2.1 on Raspberry Pi (Raspbian Stretch)

4 Comments

CouchDB 2.1 on R-PiFrom the Apache CouchDB docs:

CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents with your web browser, via HTTP. Query, combine, and transform your documents with JavaScript. CouchDB works well with modern web and mobile apps.

CouchDB also has Fauxton, a native web-based interface built into CouchDB. It provides an interface to the majority of the CouchDB functionality, including the ability to create, update, delete and view documents and configuration parameters.

I’ve already written a blog post for installing CouchDB 2.0 under Rasbian Jessie for Raspberry Pi.  I’m updating my instructions for CouchDB 2.1 and Raspbian Stretch (in addition to Jessie). I’m presenting this “how-to” in coolbook form — i.e. just type in the commands as presented and you should end up with a functional CouchDB install.  For more background and info, check out my previous blog post.

[UPDATE: 03 April 2018] I have confirmed that my instructions work for CouchDB 2.1.1 and work under Raspbian Stretch on the new Raspberry Pi 3 Model B+.

More

MongoDB 3.0.14 for Raspbian Stretch

10 Comments

The main operating system for Raspberry Pi, Raspbian, continues to evolve.  The latest version as of August 2017 is “Raspbian Stretch” — based upon the current stable version of Debian 9.  The previous version was known as “Raspbian Jessie”.  One difference between versions is OpenSSL libraries. OpenSSL is a general purpose cryptography library that provides an open source implementation of the Secure Sockets Layer (SSL).  My previous builds of MongoDB relied on the older library.  As a result, my previous binaries for 3.0.14 and 3.0.9 do not run under Raspbian Stretch.  Given this change as well as other changes to MongoDB source and newer compilers, I could no longer compile MongoDB 3.0.14 with SSL.

After a few source tweaks and use of various compiler flags, I have manged to compile MongoDB core apps and tools.  These binaries do NOT support SSL and only run under Raspian Stretch on a Raspberry Pi 3.  [UPDATE — 2018 Mar 22] I have confirmed that these binaries work on the latest Raspberry Pi 3 Model B+ with the March 2018 version of Raspbian.

More

CouchDB 2.0 on Raspberry Pi

15 Comments

The Apache Software Foundation has released CouchDB version 2.0.  CouchDB 2.0, is a “distributed” version of CouchDB, a mature NoSQL, document-oriented data-store that is accessable via a RESTful JSON API. Developers can take advantage of CouchDB’s offline capability and reliable data sync for web, mobile and IoT apps at (any) scale.

[NOTE: September 2017 — CouchDB 2.1 and Raspbian Stretch have been released.  Check out updated instructions in this blog post]

Current Raspbian (November 2016) can “apt-get install” version 1.4 and I have previously written about getting CouchDB 1.6 running on the R-Pi.  I have now installed version 2.0.0 on an R-Pi 3 and am sharing the process.  It is pretty straightforward to get CouchDB 2.0 running on the R-Pi. It takes a combination of the R-Pi specific 1.6 install and the “generic linux” 2.0 install to get things running.

More

R-Pi Clock Radio – Zeroed!

30 Comments

clock_radio_20160909_smallWe had a really old alarm clock in our bedroom.  Really old.  The LED number segments, which were a nice dim red in color, had been dying at the rate of 1 segment a year and it was getting hard to read the time.  My wife finally had enough of my “I’ll get a new one real soon” excuse and bought a new big, bright, blue LED clock to replace the old clock.  It was blue … and *really* bright … even in its dim-mode 🙁  It had to go!

My converted 1942 Crosley Radio was collecting dust on my workbench.  I had finally received a Raspberry Pi Zero and Zero4U USB hub to play with but was already lusting after the new R-Pi Zero with camera port.  I recently upgraded the audio-output on my Mac from an old USB HiFiMan Express DAC to  a Schiit Modi DAC.   Hmmmmm, seemed like I had the ingredients to make a BIG clock “radio” with alarm(s) and great stereo audio?

More

Using Python with MongoDB on Raspberry Pi 2 & 3

Add Comment

mongodb plus pythonI’ve written about getting MongoDB running on the Raspberry Pi 2. View my other posts where you can get binaries (3.0.9) or learn how to compile from scratch (3.0.7). The mongo shell works great but you may want/need to code in Python, especially for device control or data logging, etc.

PyMongo is a Python distribution containing tools for working with MongoDB, and is the recommended way to work with MongoDB from Python. You can either use Python 2 or Python 3. Python 3 did not come on the minimal Raspbian Jessie image but can be installed using “sudo apt-get install python3”.

To install the appropriate PyMongo for MongoDB 3.0.x you can do the following from the command line. Note you could use “python3” where I use “python”, depending on your preference. I normally use the default Python 2.7.

Instructions after the break: More

MongoDB 3.0.9 binaries for Raspberry Pi 2 & 3 (Jessie)

128 Comments

I’ve received feedback that some folks are having problems compiling MongoDB 3.0.7 per my instructions AND it takes a long time 😉

MongoDB 3.0.9 just became available but needs quite a few changes to source in order to compile on the Raspberry Pi.  I worked through MongoDB build scripts for ARCH ARM Linux and managed to “translate” for Raspbian (Jessie) Linux on the R-Pi 2.  Rather than creating patch files and writing instructions for building from source, I am providing my compiled binaries.  PLEASE do not post links to my binaries!  Feel free to download for personal use from this site.

[NOTE: I have compiled version 3.0.14 and created binaries for Raspbian Jessie for the R-Pi 2 & 3. NEW: I have also created 3.0.14 binaries for the R-Pi 3 running Raspbian Stretch that will also work on the new R-Pi 3B+.  I have confirmed that the instructions in this blog entry work with the new binaries.]

More

MongoDB 3.0.7 on Raspberry Pi 2!

18 Comments

MongoDB logoI have successfully compiled MongoDB version 3.0.7 and tools on the Raspberry Pi 2.  Full instructions are after the break — click on “more“.  As usual I found great help from the Linux community for getting this to work on ARM7.  mongo, mongod, mongos, and tools are all working great.  The WiredTiger Engine does NOT work under 32-bit ARM but, AFAIK, all other components do 🙂

NOTE: I have made MongoDB 3.0.9 binaries available for Raspbian (Jesse) for R-Pi 2 – here.

More

Node.js v4 & v5 on Raspberry Pi 2

3 Comments

Node.jsI had been experimenting with the world of Javascript on the server-side using Node.js.  I “fell off the horse” when Node.js had an identity and direction crisis and io.js was forked.  Node.js and io.js have reunited and the latest supported version is v4.2 with v5.0 just released.  The latest “apt-get” version of Node.js as of 15 September 2015 is (something like) 0.6 on Raspbian Wheezy.  Not current enough IMHO. I also wanted to take advantage of the ARMv7 processor in the Raspberry Pi 2.  The best way forward was to figure out how to compile the latest version from source.  NOTE that instructions have been updated for Raspbian Jessie and later versions of node.js.

More

Older Entries