You are on page 1of 1

How to Install and Configure MongoDB on Ubuntu 16.

04

Step 1 - Importing the Public Key


sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

Step 2 - Create source list file MongoDB


echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse"
| sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Step 3 - Update the repository


sudo apt-get update

Step 4 - Install MongoDB


sudo apt-get install -y mongodb-org

Step 5 - Start MongoDB


sudo service mongod start
sudo service mongod status

Step 6 -enter the etc folder


cd /etc
Step 7 – Make Changes in mongod.conf file
nano mongod.conf
comment the BindIP & save it.

Step 8 - Restart MongoDB


sudo service mongod restart
sudo service mongod status

You might also like