Installing Latest MongoDB (2.0.3) on Linux Mint 12 / Ubuntu 11.10

0

MongoDB is an open source, document-oriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas. The goal of MongoDB is to bridge the gap between key-value stores (which are fast and scalable) and relational databases (which have rich functionality). Binaries are available for WindowsLinux, OS X, and Solaris, MongoDB is available for free under the GNU Affero General Public License. The language drivers are available under an Apache License. In addition, 10gen offers commercial licenses for MongoDB.  It’s network accessible, written in C++.

Features of MongoDB:

  • Collection oriented storage – easy storage of object-style data
  • Full index support, including on inner objects
  • Query profiling
  • Replication and fail-over support
  • Efficient storage of binary data including large
  • objects (e.g. videos)
  • Auto-sharding for cloud-level scalability (Q209)
  •  High performance, scalability, and reasonable depth of functionality are the goals for the project.

Here is the turorial about install latest MongoDB ( As of now MongoDB 2.0.3 ) on Linux Mint 12 / Ubuntu 11.10.

10gen publishes apt-gettable packages.  Their packages are generally fresher than those in the Debian or Ubuntu repositories.  It contains only stable releases, under the name mongodb-10gen.  This package might conflicts with the mongodb packages in Debian/Ubuntu (If you have it already installed).

Open Terminal (Ctrl + Alt + T).

Installing:

First thing you need to add the GPG key for the MongoDB debian package.

[email protected]~/$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Then we need to add repository in our system, so edit the following file.

[email protected]~/$ sudo gedit /etc/apt/sources.list

Add the following line.

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

Update the system repository.

[email protected]~/$ sudo apt-get update

Install MongoDB.

[email protected]~/$ sudo apt-get install mongodb-10gen

Controling MongoDB:

MongoDB has it’s own controlling system, it can be start / stop by the easy known commands.

[email protected]~/$ sudo start mongodb

[email protected]~/$ sudo stop mongodb

or using normal init scripts.

[email protected]~/$ /etc/init.d/mongodb start

[email protected]~/$ /etc/init.d/mongodb stop

or using service command.

[email protected]~/$ service mongodb start

[email protected]~/$ service mongodb stop

Confirm the version of MongoDB.

[email protected]~/$ mongod --version
db version v2.0.3, pdfile version 4.5
Mon Mar  5 06:08:34 git version: 05bb8aa793660af8fce7e36b510ad48c27439697

That’s all. Now you have latest version of MongoDB installed on your machine.

You might also like