MongoDB APT Installation on Ubuntu 12.04 (Precise Pangolin).

MongoDB is an open source document-oriented NoSQL DataBase system.
Instead of storing data in tables as is done in a “classical” relational database, it stores structured data as JSON-like documents with dynamic schemas (BSON Format).

MongoDB installation on Ubuntu 12.04 (Precise) is quite easy.

Import Key for the APT Repository that will be added:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Add the repository to APT Sources /etc/apt/sources.list

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

To update Package List and Install MongoDB:

apt-get update
apt-get install mongodb-10gen

MongoDB configuration is located on:
/etc/mongodb.conf

For Upstart-based systems, the control script is located in:
/etc/init/mongodb.conf

MongoDB instance stores data files in: /var/lib/mongodb

Log files are in:
/var/log/mongodb.

The process runs using mongodb user account.

The mongo shell is included with the MongoDB package.
With this tool, it is possible to connect to MongoDB instance by issuing the ‘mongo‘ command, tis will connect to the database running on localhost interface by default.


Comments are closed.