1) Windows 7 64bit
2) MongoDB browsing
1) Unzip mongodb-win32-x86_64-3.0.3.zip to d:program_filesMongoDB
2) Add d:program_filesMongoDBbin to the environment variable %mongo%
3) Create the directory %mongo%datadb to store the database
4) Create directory %mongo%datalog to store logs
5) Create and edit the configuration file %mongo%mongod.cfg
dbpath=<span>D:\program_files\MongoDB\data\db logpath</span>=D:\program_files\MongoDB\data\log\mongo.log
6) Install MongoDB as a service
Run the following command with administrator privileges to create the MongoDB service
sc create MongoDB binPath= <span>"</span><span>\</span><span>"</span>D:\program_files\MongoDB\bin\mongod.exe\<span>"</span><span> --service --config=\</span><span>"</span>D:\program_files\MongoDB\mongod.cfg\<span>""</span><span><br /></span>
7) Start service
net start mongodb
1) Start the command line and enter mongo
2) show dbs
3) use test
4) insert
5) find
4. PHP development
1) Set up PHP environment Browse
2) Download MongoDB PHP extension, browse, and put it in the %PHP%ext directory
3) Modify php.ini and add the following code
extension=php_mongo.dll
4) Restart the Apache server
5) MongoDB PHP Manual View