This tutorial help to install mongodb server into windows. I will also let you know configuration with php server.We will use mongodb driver to connect php with mongodb.
The MongoDB is very popular nosql database in web development, Here i am creating a series of tutorial about MongoDB with php, i am using windows for development environment so all the steps illustrated here for windows.I will cover following steps regarding mongo db with php.
- Installation of mongo db on windows.
- Installation of mongo db driver on xampp.
Steps to install MongoDB on Windows
- Download latest MongoDB
64-bit MSIversion for windows .msi file and run.
- 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 I have created folder
(C:\data\db), as mentioned in mongodb docs. This is default directory of mongoDB, so don’t create anywhere else in computer.
- Now open cmd line
mongodto start mongo server, Now you can see message into the command window – “successfully connected with http://127.0.0.1/27071”
- Open another cmd line
(C:\user\palam>)and type mongo
'mongo -version'and press
'ENTER', You will see installed version of MongoDB.
Mongo Server UI
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 need to just open command line and type
cmd>mongoui, This command will start mongoui on
You can get all mongodb collection on
http://localhost:3001 url, You need to open (
http://localhost:3001) on any browser.
In This tutorial We have learn how to install mongoDB on windows, its very simple and easy to install mongoDB on windows.We have integrated php mongo driver with php server as well.I have also started mongo server using command line on windows.