How to install and config MongoDB DATABASE on Debian and Ubuntu

Now its popularity is gaining the MongoDB DATABASE.

The authors started from the need of specialization databases so that they were able to move away from the principle of “one size under it.” By minimizing the semantics for transactions appears to address a range of problems associated with a lack of performance, and horizontal scaling becomes easier. The model documents store data (JSON/BSON) is easier, easier managed (including through the use of so-called “besshemnogo style”, and the inner grouping relevant information provides an additional performance benefit. Nerelâcionnyj approach is very useful for creating databases with horizontal scaling involves expanding on multiple machines. To ensure the best performance must coexist with broader functionality than using key/value pairs (net). Technology databases should work everywhere, from the user’s servers and virtual machines to the cloud-based technologies.

Mongodb, according to developers, should fill the gap between simple data stores key-value (fast and easily scalable) and bol′šimiRSUBD (with structural diagrams and powerful queries).

MongoDB Capabilities:
1 document-oriented storage (simple and powerful JSON-like relationships)
2 flexible language for querying
3 dynamic queries
4 full support for indexes
5 query Profiling
6 Quick updates “on the spot
7 efficient storage of large amounts of binary data, such as photo and video
8 Logging operations, 9 modifying data in a database
10 support for fault-tolerant imasštabiruemosti: asynchronous replication, sharding and replica set
11 can work in accordance with MapReduce paradigm
Mongodb vs MySQL
According to numerous performance tests, which can be found on the Internet, have concluded that the main advantage of MongoDB before MySQL manifests itself during the recording and updating of data in a database, some surpassing MySQL in 1.5 times.
While data is being read opinions and tests differ, especially given the pressure, volume, etc.
Installing MongoDB
Add repository key: MongoDB

  1. sudo apt-key adv –keyserver –recv 7F0CEB10

Adding a repository MongoDB


  1. echo ‘deb dist 10gen’ | sudo tee -a /etc/apt/sources.list
Update package repositories:

  1. sudo apt-get update
Installing MongoDB:

  1. sudo apt-get install mongodb-10gen
Run MongoDB:

  1. sudo /etc/init.d/mongodb start
Test MongoDB:

  1. mongo
  2. > { a: 1 } )
  3. > db.test.find()