How to install MongoDB on Ubuntu 18.04
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.
Comments ( 0 )
No comments available