Tropical Software Observations

04 August 2009

Posted by Irregular Zero

at 11:22 AM


Labels: , ,

Installing MongoDB on Ubuntu 9.04 Jaunty Jackalope

For the installation, I decided to build MongoDB ( from source. The documentation regarding this is thorough and getting it running was a cinch. A Javascript engine called Spider Monkey is used and you need to build it with UTF8 support.

The documents referred to:

The all-in-one command line version:
sudo apt-get install curl tcsh git-core scons g++
sudo apt-get install libpcre++-dev libboost-dev libmozjs-dev

Spider Monkey installation:
curl -O
tar zxvf js-1.7.0.tar.gz
cd js/src
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export

MongoDB installation:
git clone git://
scons all
sudo scons --prefix=/opt/mongo install

Finishing up:
add /opt/mongo/bin to your path
create a /data/db directory structure and chown it to your user or add read-write permission.
System -> Preferences -> Startup Applications -> Startup Programs
click add, click browse and select /opt/mongo/bin/mongod
add run to the end of the line so that it reads '/opt/mongo/bin/mongod run'
enter name and comment then save

And you're done. mongodb will start up with no authentication as default at localhost:27017, the web information interface is at localhost:28017. You can use mongo to enter the interactive shell, similar to mysql's shell client.

Some links to get you started:


Jeremy said...

The build for spidermonkey places it's header files in /usr/include instead of /usr/include/js, which is where mongodb is looking when it attempts to compile scripting/engine_spidermonkey.cpp. Just a heads up to others trying to build from scratch.

Daily Noir said...

For me, scons all --libpath=/usr/lib worked.. Try using Mongo and Googles V8