Ticker

6/recent/ticker-posts

How To Install MongoDB on Linux Ubuntu

Mongo DB known as NoSQL and Faster Database.

MongoDB is highly scalable, Easy to access database currently being used as backend data store. Many Organizations use this backend database like Twitter, IBM, Forbes, Facebook, and Google others.

MongoDB



Step - 1

Import the MongoDB public key to your system:

sudo apt-get install gnupg

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -


Step - 2

Create a MongoDB list file:

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list


Step - 3

Update your local package database:

sudo apt-get update

Step - 4

Install the MongoDB packages:

sudo apt-get install -y mongodb-org


Step - 5

Start and enabled the MongoDB service:

sudo systemctl start mongod

sudo systemctl enable mongod

Step - 6

Verify that the MongoDB service is running:

sudo systemctl status mongod


Check the mongo Version

mongo --version

You can stop the mongoDB service anytime by typing:

sudo systemctl stop mongod

Mongo Start with 27017 port number. It is Mongo DB default port number. 

MongoDB database connect with via mongo terminal and MongoDB Compass through you can access it.
Reactions

Post a Comment

0 Comments