Tag Archives: mongo

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
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:

export PATH

Install Rockmongo on Ubuntu

For people who are searching for mongodb web admin interface, here I suggest you to use Rockmongo.

RockMongo is a MongoDB administration GUI tool, written in PHP 5.
You can read more at here.

So, first you need to install php-mongo on Ubuntu
Install PHP Pear package;

$sudo apt-get install php-pear

Then, install PHP-Mongo driver that connects PHP and MongoDB;

$sudo pecl install mongo

Then, configure PHP-Mongo driver in Apache2

$nano etc/php5/apache2/php.ini

add line below;


Restart Apache2 server

$sudo service apache2 restart

Then, download Rockmongo from web

Extract to /var/www/ folder

unzip rockmongo-.zip /var/www/

Edit config.php file an fill the required info (if any)
* In my case, I didn’t change anything

Open the web interface at http://localhost/rockmongo/

 Fill the credential (username : admin, password : admin by default)

And here the screenshot of the interface :