MongoDB is an open source NoSQL database that is primarily used in large data situations and is considered the Node.js's golden partner, and because it uses the binary JSON format, it has no affinity to JavaScript with any language. The specific introduction of this article does not elaborate, the following is mainly for MongoDB in Windows to join local services to do some simple sharing. To facilitate the first contact with MongoDB and in the Windows environment for the development of students.
First go to the official website to download the Windows Installer package: Http://www.mongodb.org/downloads
In general, choose the default 64-bit (unless your host is 32-bit), download, assuming we install to: d:/soft/mongodb/, complete, enter the directory, new data and logs two folders, and in the logs directory to create a new mongodb.log. Then open a command prompt (CMD) and the Windows8.1 user needs to be opened with an administrator. Execute the following command:
Copy Code code as follows:
D: && Cd/soft/mongodb/bin
Enter, and then execute:
Mongod--dbpath D:/soft/mongodb/data
So MongoDB happily starts, opens the browser, enters: http://127.0.0.1:27017, at this time you can see the following prompt language:
Copy Code code as follows:
It looks like your are trying to access MongoDB over HTTP on the native driver port.
Translation: You seem to be trying to access MongoDB via HTTP Local Service
Well, it's just a soy sauce. In fact, every time we start MONGO from the command line it is painful, so we need to create a permanent service, which requires us to add MONGO to the Windows Local Service. Go back to cmd, execute:
Copy Code code as follows:
Since we have already entered the D:/soft/mongodb/bin directory, just execute the following command:
Mongod.exe--logpath d:/soft/mongodb/logs/mongodb.log--logappend--dbpath d:/soft/mongodb/data-- ServiceName Mongodb-install
By opening the service window, you can see the results we need: