o7planning

Install MongoDB Database on Windows

  1. Note about versions
  2. Download
  3. Install
  4. Bắt đầu với MongoDB

1. Note about versions

MongoDB for Windows Server 2008 R2 Edition (i.e. 2008R2) runs only on Windows Server 2008 R2, Windows 7 64-bit, and newer versions of Windows. This build takes advantage of recent enhancements to the Windows Platform and cannot operate on older versions of Windows.
MongoDB for Windows 64-bit runs on any 64-bit version of Windows newer than Windows XP, including Windows Server 2008 R2 and Windows 7 64-bit.
MongoDB for Windows 32-bit runs on any 32-bit version of Windows newer than Windows XP. 32-bit versions of MongoDB are only intended for older systems and for use in testing and development systems. 32-bit versions of MongoDB only support databases smaller than 2GB.

2. Download

Note: MongoDB has 2 versions named as Community Server and Enterprice Server. Of which, the Community is the free version, and Enterprice is commercial one. In this post, I will guide you to set up and configure the free version.
You can download the installment file (msi) or zip file. If you download zip file, you will just need to extract the compressed file without necessary installment. Then you start the configuration.
Download results:

3. Install

Select a folder to install MongoDB:
Next, choose a folder to store data and logs for MongoDB, these are important data so you should put them in a safe folder, for example:
  • D:\MongoDBData\Server\5.0\data\
  • D:\MongoDBData\Server\5.0\log\
Choose to install Mongodb Compass, this is a visual tool that helps you work with MongoDB.
OK, bạn vừa cài đặt xong MongoDBMongo Compass.
The MongoDB Compass welcome window displays to introduce you to its basic features.
Restart your computer to complete the installation.

4. Bắt đầu với MongoDB

As mentioned above MongoDB Compass is a visual tool for you to work with MongoDB. Here's what the tool looks like when you run it for the first time:
This tool allows you to enter a "Connection String" to connect to a certain database on the network or leave it blank if you want to connect to the newly installed MongoDB on your computer.
After connecting to a certain database you will see an interface like this: