Mongo DB Installation on WAMP Server Windows Environment


This time i’ll explain how to install Mongo DB on Windows Environment, Mongo DB can be installed on several OS those are Linux, Mac, and Windows. Since i’m using Wamp Server as multi packages for Apache, PHP, and MYSQL, i’ll also explain an example to add Mongo DB as PHP Extension and the simplest way to run Mongo DB service on Windows.

Prerequisite : Wamp Server is already installed on your Windows (Version wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b)

Installation :

Now, Lets get the ball rolling :

1st. First, we have to download the latest build Mongo DB on MongoDB Official, download the zip file for version Windows 64-bit 2008 R2+ legacy(Version 3.0.1).

2nd. After the file has been downloaded, we have to create some directories.

  • create the Mongo DB base directory under C:\wamp\bin and named as “mongodb”.
  • create the Mongo DB version directory under C:\wamp\bin\mongodb and named as “mongodb-win32-x86_64-2008plus-3.0.1”.
  • create the following directories under C:\wamp\bin\mongodb\mongodb-win32-x86_64-2008plus-3.0.1

3th. Create the file “mongodb.conf” under C:\wamp\bin\mongodb\mongodb-win32-x86_64-2008plus-3.0.1\conf, then add this configuration.

4th. Extract  the downloaded file into bin folder.
5th. Open the windows command prompt as administrator privilege and locate it to C:\wamp\bin\mongodb\mongodb-win32-x86_64-2008plus-3.0.1\bin.
6th. Execute this command to install Mongo DB as a windows service.

7th. Open “services.msc” and run MongoDB service then start the service. We can set manually or automatically when windows start up.

Add Path on Windows Environment Variables :

1st. Right click on My Computer.
2nd. Click Advanced system settings.
3th. Click Environment Variables button.
4th. Click PATH on Variable column, then append this path.

note : adjust the version and take a look the delimiter “;”.

Check everything is running well :

1st. Open the windows command prompt as administrator privilege.
2nd. check with this command :

Add Mongo DB PHP Extension into WAMP Server PHP :

1st. Download the latest driver for windows environment from Amazonaws.
2nd. Choose the file that appropriate with the environment, i have used “php_mongo-1.6.6-5.5-vc11-x86_64.dll”, then copy this file into this directory C:\wamp\bin\php\php5.5.12\ext and rename it to “php_mongo.dll”.
3th. Add this line “extension=php_mongo.dll” on the “php.ini” file in this directory C:\wamp\bin\apache\apache2.4.9\bin\php.ini.
4th. Restart all Wamp Services.
5th. Check the extension is work by clicking Wamp icon -> PHP -> PHP Extensions, and ensure the php_mongo is checked.

Finally, congratulation the Mongo DB service has been installed and Mongo DB PHP extension has been added. 🙂

FatkhanFauzi About FatkhanFauzi

A passionate software engineer who wants to share anything that he learns and some of his life experiences. Want to know more about him? see Fatkhan Fauzi Profile


So, what do you think ?

Leave a Reply

%d bloggers like this: