MongoDB is a high-performance, open-source, and non-pattern document-based database. It is a popular nosql database. It can be used in many scenarios to replace traditional relational databases or key/value storage methods. Mongo is developed using C ++. Take the window platform as an example. Http://www.mongodb.org/downloads
Installation:
- Step 1: Download the installation package: if it is a Windows system, check whether it is a 64-bit or 32-bit version. Select the correct version.
- Step 2: Create the directory "D: \ mongodb.pdf", decompress the downloaded installation package, find the directory "all-part. EXE", and copy it to the directory you just created.
- Step 3: create a "data" folder under the "D: \ MongoDB" Directory, which will be used as the root folder for data storage.
Configure the Mongo Server:
Data warehouse server d.exeand management tool cmd.exe
Open the CMD window and enter the command as follows:
> D:
> Cd D: \ MongoDB
> Mongod -- dbpath D: \ MongoDB \ data
The following figure is displayed after the configuration is successful:
Enter http: // localhost: 27017/in the browser and you will see the following prompt:
You are trying to access MongoDB on the native driver port. For HTTP diagnostic access, add 1000 to the port number
In this way, the MongoDB Database Service has been successfully started.
Use cmd.exe to test simple JavaScript statements:
D: \ mondb> Mongo
> 3 + 3
6
> DB
> Test
> db.foo.insert( { a : 1 } )> db.foo.find(){ _id : ..., a : 1 }> show dbs...> show collections...> help