WINDOWS10 Installing MongoDB

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.