- Download MongoDB http://www.mongodb.org/downloads
- Extract it on specific folder. I suggest you to extract that on bin directory. So, I created it first before extracting that files.
- Open Start > Run > cmd
- type this command : cd C:\wamp (assume that you install WampServer on that folder, you free to change directory like cd DRIVE:\YOUR_FOLDER)
- cd bin
- mkdir mongodb
- mkdir data
- cd data
- mkdir db
- cd..
- mkdir bin
- mkdir logs
- After you created that folders, you should extract it in folder. i.e: C:\wamp\bin\mongodb\bin
- OK. Now it’s time to download mongodb drivers for PHP. You can download it inhttp://github.com/mongodb/mongo-php-driver/downloads
- Open mongo-x.x.x.zip, generally, you should select the generic build for your php version after unzipping it.
- Extract php_mongo.xxxxxxxxx.dll to C:\wamp\bin\php\php5.3.5\ext. Modify the extension section in php.ini and add “extension=php_mongo.dll”.
- Check “php_mongo” extension and the wampserver will restart and dynamically load the driver.
- Ok, back to C:\mongodb\bin folder via cmd (cd C:\mongodb\bin)
- type this command:
mongod --logpath C:\wamp\bin\mongodb\logs\error.log --logappend --dbpath C:\wamp\bin\ mongodb\data\db --directoryperdb --install
- go to C:\wamp\bin\mongodb\ by windows explorer.
Create new batch file named startmongo.bat
type this : net start “MongoDB”
That file is for starting mongodb service, if windows doesn’t start the service.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment