MongoDB also learned these days, today configured under the environment, starting today to learn the MongoDB database.
First, download
Select the development environment Https://www.mongodb.com/download-center to download in this URL and download it. I chose the 64-bit version of 3.2.7 that supports SSL.
Second, installation
After downloading the MSI file installation, you need to pay attention to the installation of the path, I installed it in the G:\MongoDB folder. After the installation is complete, the following files appear in the MongoDB folder
Third, set the data storage location
1. Create a new folder to hold the database, I created a DB folder under G:\MongoDB
2. Specify where the data is stored
From the Command Line window, point to the G:\MongoDB\bin file, and then set the location of the data through the Mongod--dbpath=g:\mongodb\db
Iv. test whether the configuration is successful
From the above we can also see 27017 port waiting for connection, open http://localhost:27017/can see the following page
The default MongoDB is a test database, so it can be connected to testing, after the connection will appear below the image of the effect, may be in the connection when the MongoDB can not start, because the target computer actively refused to connect, this is because the need to start MongoDB, and the designation DBPath above.
Window Environment Configuration MongoDB