MongoDB Part 1: Install and Configure MongoDB on windows

MongoDB is very popular nosql database in web development, here i am creating a series of tutorial about MongoDB with php on xampp, i am using windows for development so i am sharing all steps for windows.I will cover following steps regarding mongo db with php.

  1. Installation of mongo db on windows
  2. Installation of mongodb driver on xampp
  3. Connection mongo db with php and display listing of records

Steps to install MongoDB on Windows

  • Download latest MongoDB 64-bit MSI version for windows .msi file
  • Add bin path (C:\Program Files\MongoDB\Server\3.0\bin) into your environment variable to access mongodb from command line
  • Create data and db folder under your MongoDB home directory.My install directory is C, so created folder are (C:\data\db), as he mentioned in his docs, This is default directory of mongoDB, so don’t create anywhere else in computer.
  • Now open cmd line (C:\user\palam>) and type mongod to start mongo server, now you can see message in command window “successfully connected with http://127.0.0.1/27071”
  • Now open another cmd line (C:\user\palam>) and type mongo 'mongo -version' and press 'ENTER', you will get installed version of MongoDB

Updated:

You can also get web UI of Mongodb as like phpMyAdmin using node module, You can install MongoUI using below command,
npm i -g mongoui
-g options use to install mongo ui globally, you just open command line and type cmd>mongoui, This command will start mongoui on 3000 port.

You can get all mongodb collection on http://localhost:3001 url, You need to open this(http://localhost:3001) on any browser.

Conclusion

In This tutorial We have learn how to install mongoDB on windows, its very simple and easy to install mongoDB on windows.I have also started mongo server to operate mongo db windows.