Yii uses MongoDB as the database service software [win7 Environment]

Source: Internet
Author: User
Tags mongodb client mongodb driver phpinfo yii

1. Go to http://php.net, search for MongoDB in the search bar in the station, and view the relevant installation step information.

2. Find the corresponding php.ini configuration file, use Wampserver and other server software, do not find the wrong php.ini configuration file, be sure to remember to find and webserver, such as Apache, related php.ini configuration.

3. Search for "extension=" in the configuration file and add a line of Extension=php_mongo.dll.

4. View the Phpinfo page in the Web page to see the current server environment configuration, such as my machine environment:

From the red box above, we see that the current is compiled in VC9 environment, TS (thread safety), so download the corresponding MongoDB DLL extension should also pay attention to the differences.

5. After completing the above steps, you can search for the MongoDB keyword on the phpinfo page and you will see something like this:

See above, that proves that you have completed the first step of the MongoDB driver installation.

6. Next, go to the http://mongodb.org official website to download the corresponding Windows binary executable file "Note the number of bits of the computer, do not download the wrong ", this is my download MongoDB file:

7. When I installed MongoDB I chose "complete" installation, that is, fully installed, MongoDB will automatically select C:\program files\ for installation, the installation results are as follows:

8. Finally, see Mongodb.org's Official document "valid links for current time: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/", Start the Mongod.exe background process and start the command as follows:

Mongod.exe "Note that it is best to add the MongoDB Bin directory to the system's path environment variable for easy command-line operation" "Also note that in the C packing directory to create a directory structure, you can use the command" MD \data\db ".

9. After the above steps are completed, you will see the following command line display interface:

10. Next, without closing the command-line display interface above, open another command line and enter Mongo.exe to launch a MONGODB client for data interoperability.

Yii uses MongoDB as the database service software [win7 Environment]

Related Article

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.