Tag: mongodb

MongoDB on the Raspberry Pi 2

Raspberry Pi 2 After purchasing a Raspberry Pi 2, I decided to move some of my projects to it.  I also added an external 2.5 inch USB drive via a USB hub.  I store various sensor information in a MongoDB database and needed everything to run on the R-Pi 2.  I chose to stick with the well-supported Debian Linux port, Raspbian Wheezy, as opposed to ARCH Linux that I used on my old R-Pi B+, as the R-Pi 2 has a quad core ARMv7 processor that requires a new kernel.

UPDATE (30 January 2016):  I’ve compiled MongoDB 3.0.9 and tools for R-Pi 2 Raspbian (Jessie).  Check here.

UPDATE (25 December 2015): Instructions for compiling MongoDB 3.0.7 and tools for R-Pi 2 running Raspbian Jessie are now available.  Check here.

UPDATE (8 November 2015): If you are running Raspbian Jessie, you can “apt-get install mongodb”.  This will result in an install of MongoDB v2.4.  Good enough for most uses and you get a working mongo shell 😉  If you want MongoDB v2.6.3, read-on!

I was back to hunting for a compatible MongoDB binary — or instructions on how to compile from source.  Research showed that MongoDB does not compile for ARM after version 2.6.3 🙁  Searching the ‘net led me to the “facat’ blog.” This blog shows how to cross-compile MongoDB 2.6.3 for ARM.  Precompiled binaries are also available.  NOTE that the mongo shell does NOT work correctly on the R-Pi.  “mongod”, the server, does work fine and can be accessed programmatically or via a mongo shell from another (non-R-Pi) computer.  I use “mongo” on my Mac to connect to “mongod” running on the R-Pi 2.

more after the break

(more…)

Read MoreView 9 Comments

mongoDB 2.6 and Node.js 0.10.29 on Raspberry Pi

mongoDB on Raspberry PiA while back, I compiled mongoDB 2.1 for Raspberry Pi based upon instructions found on other sites and kind work by developers sharing code on Github.  I acquired a Raspberry Pi B+ and tried to compile mongoDB as I had done previously.  I quickly found out that the (old) compiled version (2.1.1) no longer functions under Raspbian.

I had also been trying out Arch Linux for R-Pi as it was “lighter” and did not include all the GUI/X components that I don’t use.  I use R-Pi for more server centric things and use frame buffer apps for video and images (omxplayer, fbi, fim).

I saw a comment to a posting when Googling for new info for mongoDB on R-Pi.  It said, simply, “use Arch Linux”.  So I did!  I had a little trouble getting Arch Linux to run on the B+ but after a firmware update obtained by a “pacman -Syu” on a R-Pi model B, I could now boot and use Arch Linux on the R-Pi B+ 🙂

I did simple installs via “pacman -S” for “mongodb” and “nodejs”.  I now have full mongoDB 2.6.3 with utilities, Node.js 0.10.29 and npm 1.4.21 working just fine.  Sure mongoDB is pretty slow and can only handle 2GB DBs but I’ve partitioned my data into multiple DBs and combine queries and results using JavaScript.

My effusive thanks go to the Arch Linux Package maintainers!

View 1 Comment

Raspberry Pi meets mongoDB

mongoDB on Raspberry PiI’ve been looking at noSQL databases in conjunction with Node.js. I have several Raspberry Pis that I have been using as development and test platforms. I have had good success with couchDB but have seen more examples and deployments using mongoDB. MongoDB is clearly developed on Intel processors but has been ported to non-Intel processors with different “endian”. Getting mongoDB to compile and run on a Raspberry Pi has been a challenge — as seen by the dearth of info when Googling. I did run across a couple of useful sites with links and directions on how to compile mongoDB on the R-Pi BUT both had a few problems. I’ve managed to get mongoDB version 2.1.1 working.  Specific instructions — (more…)

Read MoreView 7 Comments