• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install MongoDB on Ubuntu 18.04

  • 00:38 apt update
  • 00:55 apt install -y mongodb
  • 01:14 systemctl status mongodb.service
{{postValue.id}}

MongoDB Installaion on Ubuntu 18.04

MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemata. In this tutorial, you will learn the method to install MongoDB on Ubuntu 18.04

Installation

First we need to update the packages list to have the most recent version of the repository

root@linuxhelp1:~# apt update
Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.2 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 247 kB in 1s (180 kB/s)                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
667 packages can be upgraded. Run 'apt list --upgradable' to see them.

Once it is done, you can install the MongoDB package by running the following command

root@linuxhelp1:~# apt install -y mongodb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libboost-program-options1.65.1 libgoogle-perftools4 libpcrecpp0v5
  libsnappy1v5 libtcmalloc-minimal4 libunwind8 libyaml-cpp0.5v5
  mongo-tools mongodb-clients mongodb-server mongodb-server-core
The following NEW packages will be installed:
  libboost-program-options1.65.1 libgoogle-perftools4 libpcrecpp0v5
Setting up mongodb-server (1:3.6.3-0ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mongodb.service → /lib/systemd/system/mongodb.service.
Setting up mongodb (1:3.6.3-0ubuntu1) ...
Processing triggers for libc-bin (2.27-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu6) ...

After installation you need to check the service's status

root@linuxhelp1:~# systemctl status mongodb.service 
mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor 
   Active: active (running) since Wed 2019-01-02  00:23:51 IST; 43s ago
     Docs: man:mongod(1)
 Main PID: 36117 (mongod)
    Tasks: 23 (limit: 1706)
   CGroup: /system.slice/mongodb.service
           └─36117 /usr/bin/mongod --unixSocketPrefix=/run/mongodb --conf

Jan 02 00:23:51 linuxhelp1 systemd[1]: Started An object/document-oriented database.

With this the method of MongoDB comes to an end.

Tags:
owen
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How is sharding appropriate for a new deployment for MongoDB?

A

Sometimes. However, if your data set fits on a single server, you should begin with an unshared deployment as sharding while your data set is small provides little advantage.

Q

How does mongos detect changes in the sharded cluster configuration?

A

mongos instances maintain a cache of the config database that holds the metadata for the sharded cluster.


mongos updates its cache lazily by issuing a request to a shard and discovering that its metadata is out of date. To force the mongos to reload its cache, you can run the flushRouterConfig command against each mongos directly.

Q

When and why MongoDB is used?

A

Wherever a developer is considering a relational database, they should consider MongoDB.


Wherever a developer is considering a NoSQL database, they should consider MongoDB.

Q

How is data stored in MongoDB?

A

Data in MongoDB is stored in BSON documents – JSON-style data structures. Documents contain one or more fields, and each field contains a value of a specific data type, including arrays, binary data, and sub-documents. Documents that tend to share a similar structure are organized as collections.

Q

Is MongoDB schema-less?

A

No. In MongoDB, schema design is still important. MongoDB's document model does, however, employ a different schema paradigm than traditional relational databases.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.