MongoDB on Raspberry Pi

Recently, I want to install MongoDB in my Rasp Pi. But unfortunately, I can’t install MongoDB via apt-get because Rasp Pi is using ARM architecture.

Maybe we can compile it from source code. Yes. We can. But MongoDB source is very x86 specific, meaning the newest version isn’t available for ARM architecture.

But… Thanks to this owsem patches from Per Ola Ingvarsson on Github at https://github.com/skrabban/mongo-nonx86, now we can compile MongoDB on Rasp Pi. Yeay!

So, to build MongoDB on your RaspberryPi:
Install the required packages:

sudo apt-get install git-core build-essential scons libpcre++-dev xulrunner-dev libboost-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev

Clone the Github repo:
git clone https://github.com/skrabban/mongo-nonx86

Now let’s compile it! (*Note that these two steps take a very very long time on a Rasp Pi. So I left mine for 1 day for this.)

cd mongo-nonx86
scons
sudo scons --prefix=/opt/mongo install

Done! You have MongoDB installed on your Rasp Pi.

This will install mongo in /opt/mongo, to get other programs to see it, you can add this dir to your $PATH:

PATH=$PATH:/opt/mongo/bin/
export PATH

4 thoughts on “MongoDB on Raspberry Pi

  1. SA

    Hi, you are a gmi student studying netsec right ? I am going to gmi this july. How is the overall teaching for netsec at gmi ? Where can we go after finishing our studies in gmi and is it 70 percent practical based ?

    Reply
    1. zam Post author

      Overall not bad la. Macam kolej/universiti yang lain, rajin belajar & buat assignment, berjayalah dengan cemerlang. Banyak main, paham2 je la. Soalan untuk mana halatuju lepas belajar tu ikut minat. Nak pegi ke network boleh, nak pegi ke security pun boleh.

      Reply

Any Comments?