Appendix: Setting Up MongoDB Locally
Learn to install MongoDB on your local machine and verify that it's running to start developing and experimenting with databases.
Before you can use MongoDB, you need to install it on your computer. This lesson will walk you through the installation process for Windows, macOS, and Linux, and show you how to verify that MongoDB is up and running.
Step 1: Download MongoDB
Visit the MongoDB download page. Next, choose your operating system: Windows, macOS, or Linux. Then download the installer. Try downloading the latest version of the MongoDB community server.
Step 2: Install and start MongoDB
For Windows
Run the installer: Double-click the downloaded
.msifile.Follow the setup wizard: Choose “Complete” setup. Optionally, install MongoDB Compass (a GUI for MongoDB).
Finish installation: Click “Finish” when done.
MongoDB should start automatically as a Windows service. To start manually, open the command prompt and run: