MongoDB installation, mongodb_PHP tutorial

Source: Internet
Author: User
Tags create mongodb install mongodb
Install MongoDB. Unzip to d: program_filesMongoDB2) d: program_fil MongoDB installation, mongodb
1. prepare required tools

1) Windows 7 64bit

2) MongoDB browsing

2. Installation

1) decompress mongodb-win32-x86_64-3.0.3.zip to d: \ program_files \ MongoDB

2) add d: \ program_files \ MongoDB \ bin to the environment variable% Mongo %

3) create a directory% Mongo %\ Data \ db is used to store databases

4) create a directory% Mongo %\ Data \ log is used to store logs.

5) create and edit the configuration file% Mongo %\ Mongod. cfg

dbpath=D:\program_files\MongoDB\data\dblogpath=D:\program_files\MongoDB\data\log\mongo.log

6) install MongoDB as a Service

Run the following command as an administrator to create the MongoDB service.

sc create MongoDB binPath= "\"D:\program_files\MongoDB\bin\mongod.exe\" --service --config=\"D:\program_files\MongoDB\mongod.cfg\""

7) start the service

net start mongodb
3. use

1) start the command line and enter mongo

2) show dbs

3) use test

4) insert

5) find

4. PHP Development

1) build a PHP environment for browsing

2) Download MongoDB PHP extended browsing and place it in% PHP %\ Ext Directory

3) modify php. ini and add the following code:

extension=php_mongo.dll

4) restart the Apache server

5) browse MongoDB PHP Manual

1. prepare required tools 1) Windows 7 64bit 2) MongoDB browser 2. install 1) unzip mongodb-win32-x86_64-3.0.3.zip to d: \ program_files \ MongoDB 2) d: \ program_fil...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.