Installing MongoDB Community Edition
Installation Guide
Installing MongoDB Community Edition involves different steps depending on your operating system. Below is a brief guide for installing MongoDB on Windows, macOS, and Ubuntu Linux.
1. Windows Installation
Prerequisites:
Windows Server 2022, Windows Server 2019, or Windows 11 (64-bit).
Steps:
Download the Installer:
Visit the MongoDB Download Center and select the latest version for Windows.
Choose the MSI package and click "Download."
Run the Installer:
Locate the downloaded
.msi
file and double-click to run it.
Follow the Installation Wizard:
Choose "Complete" for a full installation.
Opt to install MongoDB as a Windows service for automatic startup.
Specify data and log directories if different from defaults.
Install MongoDB Shell (
mongosh
):The installer does not include
mongosh
. Download and install it separately from the MongoDB Shell Installation Instructions.
Start MongoDB:
If installed as a service, it starts automatically.
To start manually, open Command Prompt as Administrator and run:
arduino복사편집"C:\Program Files\MongoDB\Server\8.0\bin\mongod.exe" --dbpath="C:\data\db"
For detailed instructions, refer to the official MongoDB documentation for Windows.
Post-Installation:
Verify Installation:
Open the MongoDB shell by running
mongosh
in your terminal or command prompt.To check the MongoDB server version, run:
db.version()
Configure as Needed:
Modify the MongoDB configuration file (
mongod.conf
) to suit your requirements.
For comprehensive installation instructions and additional details, please refer to the official MongoDB installation documentation.
Last updated