Skip to content

Instantly share code, notes, and snippets.

@colindensem
Created January 24, 2010 17:05
Show Gist options
  • Save colindensem/285310 to your computer and use it in GitHub Desktop.
Save colindensem/285310 to your computer and use it in GitHub Desktop.

Installing MongoDB on Debian (Ubuntu 9.10 Karmic Koala) – From Scratch!

$ sudo apt-get -y install tcsh git-core scons g++
$ sudo apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9.1-dev
$ curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ tar zxvf js-1.7.0.tar.gz
$ cd js/src
$ export CFLAGS=“-DJS_C_STRINGS_ARE_UTF8”
$ sudo make -f Makefile.ref
$ sudo JS_DIST=/usr make -f Makefile.ref export
$ wget http://downloads.mongodb.org/linux/mongodb-linux-i686-1.2.1.tgz
$ tar -zxvf mongodb-linux-i686-1.2.1.tgz
$ cd mongodb-linux-i686-1.2.1
$ sudo -s
$ mv bin/* /usr/local/bin
$ mv include/* /usr/local/include
$ mv lib/* /usr/local/lib
$ cd ../
$ rm -fr mongodb-linux-i686-1.0.0 mongodb-linux-i686-1.2.1.tgz
$ mkdir -p ~/testing/mongo/data/db

Ok, you’ve installed. Now use it!

$ mongod —dbpath ~/testing/mongo/data/db

Open a new Terminal Tab

$ mongo

That’s all folks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment