Tuesday, September 15, 2020

Install MongoDB ubuntu

  No comments

How to Install MongoDB Community Edition, you can follow the steps in Mongodb documentation.

type this command on your terminal.

1. Import public key

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

2. create list of mongodb

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

3. Reload local package

sudo apt-get update

4. Install the mongodb packages

sudo apt-get install -y mongodb-org

5. Start MongoDB

sudo systemctl start mongod

6. Verify the status

sudo systemctl status mongod

7. Using mongodb

mongo


if you got warning "Enable Access Control" when running mongodb. You can follow this step to fix it.

How to Enable Access Control MongoDB

No comments :

Post a Comment