Install MongoDB database on Windows

    Recently, I wanted to learn NodeJs, and I shopped around the Internet. Most of them tended to say that NodeJs and MongoDB are a perfect match, so I also fiddled with the installation method of MongoDB. I hope I can share it with you. If there is any misunderstanding, please correct me.

1. Download:

    I installed MongoDB version 3.2: mongodb-win32-x86_64-2008plus-ssl-v3.2-latest-signed.msi

    Download address: http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-v3.2-latest-signed.msi

     Download other versions: https://www.mongodb.org/dl/win32/x86_64-2008plus-ssl

2. Installation

    The installation process is no different from installing ordinary software. After the download is complete, you can basically click next. If you need to define the installation path, you can choose the custom installation mode, and then browse to select the installation path.

The path I installed is: D:\Program Files\MongoDB\Server\3.2

Now click: mongod.exe under D:\Program Files\MongoDB\Server\3.2\bin will flash by, because mongo will not automatically create the directory where the db file is saved, we need to create it in the root directory of the current disk data\db folder, the folder I created is: D:\data\db.

Click mongod.exe again to start the service. The default port of mongodb is 27017. We open the browser to access: http://127.0.0.1:27017/ If it displays:

It looks like you are trying to access MongoDB over HTTP on the native driver port.

It means the startup is successful.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325479099&siteId=291194637