MongoDB 3.2 into xUbuntu 15.10

After I looked over the the steps from:  I wanted to start the service with:

Unfortunately I had below error:

Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.

This error occurred due to the problem with the new Ubuntu (15 and ahead).

Default init system is systemd which was Upstart previously. So you need to install Upstart, reboot your system and here you go, you can now run mongodb service.

  • Install Upstart

  • Reboot your system

sudo service mongod start mongod start/running, process 3371

As alternative to install mongodb:

Edit: 05.01.2016: Just follow below steps as an alternative to fix mongod.service:

Create a mongod.service into /lib/systemd/system/

Then run the commands:

My /etc/mongod.conf file looks like:



MongoDB – Installation and basic commands

MongoDB is a document-orientated database, a NoSQL database with a JSON-like documents and dynamic schema:

  • Tables are collections
  • Rows are documents
  • No schema

The advantages of using documents:

  • Documents (objects) correspond to native data types in many programming languages.
  • Embedded documents and arrays reduce need for expensive joins.
  • Ability to perform dynamic queries on documents using document-based query language.
  • Conversion of objects to database objects is not needed
  • High performance – uses internal memory to shore working sets of quick data access.

Advantages of MongoDB vs RDBMS

  • Schema less – the document is flexible compared to “table” structure including nullable fields from RDBMS. One collection can hold even different different documents. Number of fields, content and size of the document can be differ from one document to another.
  • No complex joins – as data is usually stored with the same document. We’re going to discuss about embedding related data in document and how MongoDB is dealing with the lack of relations.
  • Ease of scale-out – MongoDB is easy to scale.
  • Conversion / mapping of application objects to database objects not needed. See
  • Document Oriented Storage: Data is stored in the form of JSON style documents. Everybody is talking JSON there days: client, server and database.
  • Atomic – in-place updates: $inc, $set, $push, $pop, $rename, $bit. No need to deal with the complexity of transactions.

Where should use MongoDB?

  • Big Data
  • Content Management and Delivery
  • Mobile and Social Infrastructure
  • User Data Management
  • Data Hub


MongoDB is a cross-platform so major OS are covered together with the option to install manually or via setup procedure (msi, apt-get, homebrew).

Below we’re going to add the steps to manually install mongoDB on Windows platform. You can find the latest stable release here.

For Debian/Ubuntu installation, please use this link.

For the installation of mongodb I recommend to use a custom folder (eg.d:\mongodb) Also is recommended to open cmd.exe as admin and then create data\db and log folders.

You could simplity and add some details into mongo.config to adjust the config of mongod service:

For the manually binary installation it’s better to start the mongod as a windows service:

Mongo Shell

Let’s start the shell by using mongo.exe.
is the mongoDB server.

Below some basic mongodb shell commands:

This is the first article on a series of mongoDB related ones.

Additional links:



Nosql vs SQL

Relational databases (RDBMS) were not designed to cope with the scale and agility challenges that face modern applications, nor were they built to take advantage of the commodity storage and processing power available today.

The Next Generation of Databases is addressing some of the points: being non-relational, distributed, open-source and horizontally scalable.

The movement began early 2009 and is growing rapidly. Often more characteristics apply such as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more.

Why is NoSQL exploding? The easy way to explain this is flexibility and power. So do we want to drop 40+ years of RDBMS ? No, more than that the community now translates “nosql” mostly with “not only sql“.

NoSQL Database Types:

According to  there are 225+ NoSQL solutions available.

The NoSQL market is expected to be $3.5 billion by 2018, according to a Market Research Media Ltd. In the meantime the RDBMS market is around $26 billion (n.r. 2013) with about 9 percent annual growth so by 2018 the RDBMS market will reach $40 billion.

In the future posts I’m going to focus on MongoDB database, covering from basic aspects and DevOps to more advanced topics.