First, describe
MongoDB is written by the C + + language and is an open source database system based on distributed file storage.
Second, installation
1, download the installation package, the official website address: https://www.mongodb.com/, if I download the installation package as: Mongodb-win32-x86_64-2008plus-ssl-3.4.12.zip
2, decompression, to me, for example, the root directory after decompression: D:\moy\mongodb
3. Initialize the database
A, MongoDB stores the data directory in the DB directory. However, this data directory is not actively created, and we need to create it after the installation is complete.
B. Open the CMD window with the administrator and go to the root directory under the Bin folder
CD D:\moy\mongodb\bin
C, in the same level directory of the bin directory, that is, the root directory, the new data directory, and then the data directory, the new DB directory
mkdir Data CD data mkdir db
D. Initialize the database
D:\moy\mongodb\bin\mongod --dbpath D:\moy\mongodb\data\db
E. Open Browser input http://localhost:27017/test initialization succeeded
Third, set up the service
1, in the same level directory of the bin directory, that is, the root directory, create a new mongod.cfg file, add the following content
Systemlog: destination:file path:d:\moy\mongodb\log\mongo.logstorage: dbpath:d:\moy\mongodb\ Data\db
2. Create a new log folder and create a new Mongo.log file in the log folder.
3. Enter the installation service command
"D:\moy\mongodb\bin\mongod.exe" "D:\moy\mongodb\mongod.cfg " --install
4. Start, stop, and Delete service commands
net start mongodb net stop mongodb "D:\moy\mongodb\ Bin\mongod.exe" --remove
Yexiangyang
[Email protected]
WINDOWS10 Installing MongoDB