Go to the official MongoDB website
Download MongoDB Community Server for Windows
Run the installer
Choose the Complete setup option
Select Install MongoDB as a Service
Choose the default service account or a custom one
Select the MongoDB Compass option if needed
Finish the installation
Create a data directory such as `C:datadb`
Open Command Prompt as Administrator
Start MongoDB with `mongod`
Verify the server is running
Open a new Command Prompt window
Run `mongosh` to connect to MongoDB
Add MongoDB to the system PATH if needed
Confirm installation with `mongod –version` and `mongosh –version`
