This section introduces the installation of MongoDB in the Windows environment. MongoDB is divided into Community Edition and Enterprise Edition. Usually, we install the Community Edition (free). MongoDB Compass is a visual GUI tool that makes it convenient for us to operate MongoDB. If you don't install MongoDB Compass, you'll have to operate MongoDB by typing commands.

Below are instructions on how to install MongoDB and MongoDB Compass in the Windows environment.

Windows Version Requirements

Requires Windows 7 64-bit or higher.

Download Installation Package

Official download address:

https://www.mongodb.com/try/download/community?tck=docs_server

Select the Windows version and download the MSI installation package.

The download page is as follows: windows installation of MongoDB

Install MongoDB

The MSI installation package provides a visual installation process. Just keep clicking "Next."

Note: When you reach the following step, uncheck the option to automatically install MongoDB Compass, as it may take a long time to download from the internet. It's better to manually install Compass.

Note: Because MongoDB is installed in a Windows environment, it runs as a system service by default and starts automatically. If you want to control the startup of MongoDB manually, you can open the Windows system services and operate MongoDB manually.

Install MongoDB Compass

MongoDB Compass is a visual operating interface. Below are the steps to install it in a Windows environment.

Download the Compass installation package from the official website:

Official website address:
https://www.mongodb.com/try/download/compass

Similar to downloading the MongoDB installation package, select the Windows version and download the MSI installation package.

The installation process is similar to MongoDB, just keep clicking "Next."

After successful installation, run MongoDB Compass. The interface will look like this:

To connect to the locally installed MongoDB, simply click "Connect" without filling in anything.

After successfully connecting to MongoDB, you can see which databases MongoDB has, as shown below:

Note: The specific usage of MongoDB Compass will be introduced in subsequent chapters.