UPDATE: CouchDB 2.3 on Raspberry Pi 4 & 3

From 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 2.3 and Raspbian Buster (in addition to Stretch and Jessie). I’m presenting this “how-to” in cookbook 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.

[Updated 10 July, 2019] Continue for detailed instructions

(more…)

Read MoreView 9 Comments

MongoDB 4.0.11 (64-bit) on Raspberry Pi 3

MongoDB plus Bionic Beaver on Pi

[UPDATED 05 Jan 2020] There is now an official Ubuntu 18.04 LTS image for Raspberry Pi 3. Install the arm64 image following instructions on the Ubuntu Wiki. You can then install MongoDB 4.2.x per this blog entry. NOTE that I still recommend adding swap space – as mentioned below.

[UPDATED 03 Nov 2019] Looking to run MongoDB 4.2.x on a Raspberry Pi 4? Check out this post. It is also possible to run Ubuntu 18.04.2 (ARM 64-bit) directly on the Raspberry Pi 3. You can read more about this and get SD Card images from the Ubuntu wiki. I am using the server version of “Ubuntu Classic” as opposed to the new “Snappy Ubuntu Core.” MongoDB has an official release of MongoDB 4.0.6 4.0.11 for “Ubuntu 16.04 Linux 64-bit ARM 64.” I will show how to install this version of MongoDB under Ubuntu 18.04 on the Raspberry Pi 3B+. These instructions should work for any version of R-Pi 3 but I have only tested on my Raspberry Pi 3B+.

(more…)
Read MoreView 21 Comments

MongoDB 3.4 (64 bit) running on a Raspberry Pi 3 [update]

[Updated: 28 Feb 2019] Time to lose this post!  The MongoDB 3.4 binaries have vanished from the Debian buster ARM repository BUT I now have MongoDB 4.0.6 running under Ubuntu 18.04 on a Raspberry Pi 3B+  Check out this new post!

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.4.18 running under Debian buster on a Raspberry Pi 3 — with a few 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: the latest image WILL work for the new R-Pi 3B+.  There are a growing number of apps that run under buster 🙂  My install is strictly terminal based — or headless (via ssh).  The MongoDB utilities are also (now) ported.  You can run “mongod,” “mongos,” the “mongo” shell and utilities such as “mongoimport,” “mongodump,” and “mongorestore” from the local command line or via ssh.

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…)

Read MoreView 5 Comments

Pi-hole® Ad Blocker runs great on the ODROID C2

I decided to try the Pi-hole® network-wide ad blocking service on a ODROID C2 SBC. I Googled around and saw mention of this running on ODROIDs but no specific “how-to” info. I know it runs well on a Raspberry Pi as I tried that 🙂 The ODROID C2 has more power, memory and network bandwidth so it should be (and IS) a great host.

In case you don’t know, Pi-hole is a network-level advertisement and internet tracker blocking service which acts as a DNS sinkhole and optional DHCP server for use on a local/private network. You setup your computers to use the Pi-hole host as the DNS server — and your done! It also provides a great web interface dashboard for options and status.

Installing Pi-hole on an ODROID C2 running Ubuntu is very straightforward. You can use the instructions from Git: https://github.com/pi-hole/pi-hole


git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
sudo bash basic-install.sh

If you end up using Pi-hole, please support its development. Donation info is available at the Git URL above.

Comment

Insert webcam image into a webpage

Raspberry Pi Zero W with camera in official case

I had the need to embed a webcam image in a webpage. I did not want to stream video and did not want to view images directly on my Raspberry Pi. I wanted to take a picture every so often and upload the image onto a website. I also wanted the webpage to update with the latest image. One other requirement was for the webcam to (try to) survive power outages without file system corruption and with auto-start at boot/reboot. Yet another Raspberry Pi Zero project was born!

I will assume that you have setup a Raspberry Pi Zero W with an official camera module though other Raspberry Pi versions will certainly work. I am using the official Zero case with camera lid as it makes a nice small package and protects the camera. I recommend using the Raspbian Stretch Lite Operating System. Ensure that you configure WiFi and have internet connectivity where you plan to position the Pi/Camera. You will need terminal or ssh access to the Pi during the setup described here.

Project steps:

  • Test camera and software configuration & prepare image for uploading
  • Setup SSH keys for easy, hands-off image file upload
  • Write shell script to take & upload image
  • Create a start-up service to launch the script & recover from errors
  • Create an environment where only RAM & not the SD Card is used
  • Prepare the target server & webpage to receive & update image
  • Enjoy!
(more…)
Read MoreComment

UPDATE: MongoDB 4.0.6 on ODROID C2 with Ubuntu 18.04

I use a MongoDB database to analyze data extracted from logs on Linux production servers that handle hundreds of thousands of users per day.  I also have databases that I use for research topics – oriented around K-12 education.  I have pulled data from The British Library and various datasets from the Europeana Collections.

I’ve blogged before on MongoDB running on a 4 ODROID C2 SBC Cluster with external SATA drives — see this post.  I had tried both Arch and Ubuntu flavors of Linux.  I pointed out then that MongoDB had an official Enterprise Server Version 3.6 for Ubuntu 16.04 ARM 64.  MongoDB Release 4.0.6 is now available for download (as of 15 February 2019).  Please check the license terms of the “Enterprise Server Version”.  There is also a “Community Server” version that might better meet your needs and/or avoid restrictions.  The Community Server install is what is described in this post.

OK it’s great that MongoDB has an official version for “Ubuntu 16.04 Linux 64-bit ARM 64.”  I, however, am running the latest Ubuntu OS for ODROID C2 – “Ubuntu 18.04.2 LTS (Bionic Beaver).”

OK, here is the quick and simple way to install the latest MongoDB on your ODROID C2 running Ubuntu 18.04…

(more…)

Read MoreView 1 Comment

Replace that tennis ball with a talking Raspberry Pi!

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…)

Read MoreView 4 Comments

MongoDB 3.0.14 for Raspbian Stretch

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…)

Read MoreView 21 Comments

PerAspera-AdAstra.Space

The Planetary SocietyMy wife, Claire, and I have been members of the Planetary Society since its founding in 1980. I was fortunate to be working at The Jet Propulsion Laboritory when Carl Sagen, Bruce Murray and Louis Friedman founded the society. Bill Nye, “The Science Guy” and space advocate, is now CEO.

The society’s mission has changed only slightly over the years and is now:

to empower the world’s citizens to advance space science and exploration. We advocate for space and planetary science funding in government, inspire and educate people around the world, and develop and fund groundbreaking space science and technology.

So, why this post and why this title? The Planetary Society has offered a year-free domain registration with the Top-level domain (TLD) of “space” to members. Well, I needed to take advantage of that and spread the word about this TLD. Being a big Science Fiction fan, the phrase, “Per aspera ad astra” came to mind. Several variants have already been taken so I had to be a (tiny) bit creative.

Until I think of “better” content and have time to put something together, the URL, PerAspera-AdAstra.space points to this blog.

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

Comment

MongoDB 3.0.14 binaries for Raspberry Pi 3

[UPDATE: 26 August 2017 – The binaries referenced in this post only work with Raspbian Jessie!  If you have upgraded to Raspbian Stretch on a R-Pi 3 or R-Pi 3B+, get the newer binaries]

The mongoDB documentation at mongodb.com states that 32-bit binaries are deprecated with release 3.2 and will be unavailable in future releases.  The latest version with 32-bit support (i.e. R-Pi with Raspbian) is 3.0.14 as of March, 2017.  I have compiled MongoDB 3.0.14 for Raspberry Pi 2 and 3.  I needed a few tweaks to the build process I used to compile 3.0.9 and associated tools. Use the installation instruction in my previous blog post to install and run MongoDB 3.0.14 on R-Pi.  The only change is to download newer files.  I have compiled MongoDB and Tools with the SSL flag — so the SSL option is available.

(more…)

Read MoreView 22 Comments