Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgda-5.0-common libgranite-common libgranite3 libgsignon-glib1
libindicate5 libjs-jquery libnoise-core0 libtagc0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
0 upgraded, 5 newly installed, 0 to remove and 168 not upgraded.
Need to get 47.4 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2/multiverse amd64 mongodb-org-shell amd64 3.2.6 [5,257 kB]
Get:2 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2/multiverse amd64 mongodb-org-server amd64 3.2.6 [9,541 kB]
Get:3 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2/multiverse amd64 mongodb-org-mongos amd64 3.2.6 [4,337 kB]
The above command will install several packages containing latest stable version of MongoDB along with helpful management tools for the MongoDB server.
Once MongoDB has been installed, you will need to create system unit file, which determines how to start or stop the service, when should it be automatically started at boot, and whether it is dependent on other software to run.
You can do this by creating mongodb.service file inside /etc/systemd/system directory:
Once you have finishes, you can start the newly created service using the following command:
sudo systemctl start mongodb
You can also check that the service has started properly, run the following command:
sudo systemctl status mongodb
You should see the following output:
mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset:
Active: active (running) since Fri 2016-06-20 11:30:52 IST; 2min 23s ago
Main PID: 7078 (mongod)
Tasks: 16 (limit: 512)
└─7078 /usr/bin/mongod --quiet --config /etc/mongod.conf
June 20 11:30:52 linux systemd: Started High-performance, schema-free document
lines 1-9/9 (END)
Now, you will need to enable the MongoDB service that start automatically, when system starts.
You can do this by running the following command:
sudo systemctl enable mongodb
You should see the following output:
Created symlink from /etc/systemd/system/multi-user.target.wants/mongodb.service to /etc/systemd/system/mongodb.service.
I hope you can now easily install MongoDB on your system. MongoDB is a great NoSQL database that can be configured quickly and used in any of our applications. For Node applications, you can start up MongoDB quickly so that we can get to the fun part, building applications.
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...