Well, today I suddenly found out that the newly bought surface didn't have MongoDB installed, and then thought about installing it, by the way, though the installation process was simple.
One: Download the installation, and then copy to the C packing directory, this is not much to say, than QQ is simple.
Two: Copy the bin folder to the MongoDB directory, then create a data folder in the root directory to hold the log and database, then the Data folder to build a DB and log folder, and the log folder under the new Mongolog.log, as shown in the following image:
Three: In the MongoDB root directory, see a configuration file, the content is as follows:
Dbpath=C:\MongoDb\data\dblogpath=c:\MongoDB\data\log\mongolog.loglogappend=true Auth=false
This is the contents of the Mongodb.config file, auth default to False, no password authentication
Four: PowerShell administrator mode navigates to the bin directory and then runs
. \mongod--config c:\MongoDB\mongodb.config--servicename MongoDB--install
In this way, the service is installed, and then in the service that block right-click Start service, so MongoDB even if installed, next to set the password
Five:
Use admindb.createuser ({User:"sa", pwd:"123456", Roles:[{role:"root", DB:"admin"}]})
Change the config file's auth=false to true and restart the service.
WIN10 installing MongoDB and configuring it as a service