1. Download
Download the corresponding version of the system in MongoDB's official website (zip format recommended)
Extract to hard drive, path such as D:\MongoDB
2. Create a Directory
Create the Data folder under the MongoDB root directory (flat with the original bin directory);
Data inside the DB and log folder, respectively, for the storage and log;
PS: folder and file name arbitrarily, just guarantee the path in the third step corresponding to
3. Start
Open cmd, enter the Bin folder , enter the command:
Mongod--dbpath E:\MongoDB\data\db--logpath E:\MongoDB\data\log\mongodb.log
Mongod // start command
--dbpath//Specify Data storage directory
--logpath //Specify log file directory (specified to file, can be txt format)
PS: If a folder or file name is created with a space, the path needs to be wrapped in double quotes, such as "E:\MongoDB\my data\db"
Display as, for startup success
Open Task Manager and you'll see the Mongod.exe process
You can then manipulate the database using a command or visualizer (such as a Robomongo) connection
4. Writing to the Windows service
It is inconvenient to use a long command every time you start, and you can write mongod to the Windows service to enable it later
The method is simple, add--install after the above command
Mongod--dbpath E:\MongoDB\data\db--logpath E:\MongoDB\data\log\mongodb.log--install
PS: The above command needs to ensure that cmd execution is opened under administrator privileges
Later, you can use the command to start/close the service:
net start mongodbnet stop MongoDB
@zhnoah
Source: http://www.cnblogs.com/zhnoah/
This article is owned by me and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original
The right to pursue legal liability.
Installation and start-up of MongoDB under Win7