1. Download
First go to Baidu to find mongodb. Enter the official website
Click the following buttons in sequence
Find the version you want to download (although there is only this one).
2. Installation
Follow the normal installation procedure. When you encounter the following steps, you can choose a custom installation (custom). I choose to install it on the D drive, and then there is a long wait. Don't doubt it, it's really long. If you can't wait any longer, and then accidentally Turn it off, then you just need to restart, then install it again, click change, then delete it and wait again. At the end there will be a leaf jumping and jumping, which is very pleasant. After that, there is an agreement and agree.
Then you can see a welcome interface, keep clicking NEXT.
Don't worry about him for the time being after clicking, this is just a tool.
3. Start building the database
Find the installed folder, create date under it
After that create db under date
3. First know where the bin is
Start the cmd command line. Find bin according to the installed address
Enter the command to start MongoDB
After a bunch of code (obviously unsuccessful)
4. Check if it has been successful
Check if the service has been successfully configured
After checking, it can be found that no service exists
Create a file log under date (to store the log)
Then create a mongo.txt document under Mongobd. (make configuration file)
After opening, make the following settings and save
This will create a config configuration file.
Open it with notepad, type
dbpath=D:\Mongodb\date\db
logpath=D:\Mongodb\date\log\mongo.log
Then open cmd as administrator
can be found by
Configure windows service:
Enter the following command to configure the Windows service (first jump to the bin directory in the Mongdb file, and enter the configuration command)
Check again that the local service appears
Created a new folder with the same name db on Mongodb (temporarily intending to create a database in another place for easier use in the future)
5. Start:
we need to use
To create a database on D:\Mongodb\db, enter this string of commands
27017 is the default port (the last line will appear)
Enable the database:
Open
Enter the default host name and default port (usually the default is OK)
click
Then you can see your database
But every time you start it, you need to enter
and cannot be closed