If you want to use MongoDB on Windows, you can install it with these steps:
- Navigate to http://www.mongodb.org/downloads
- Choose option "On-premises MongoDB locally"
- Choose "MongoDB Community Server"
- Choose platform Mac
- Download
Now you have the tar-file in Downloads and you can extract it by clicking the file.
After you have extracted the tar file do this
- Open the Terminal
- Move the mongodb-macos-x86_64-5.0.3 folder from Downloads to your home folder with this command
mv Downloads/mongodb-macos-x86_64-5.0.3 ./
- Install Compass with the commands
sudo mongodb-macos-x86_64-5.0.3/bin/install_compass
- Create folder for mongo data
mkdir mongodata
- Now you can start the mongoserver (mongod) with the command
./mongodb-macos-x86_64-5.0.3/bin/mongod --dbpath ./mongodata
- You can start the client(mongo) with the command
./mongodb-macos-x86_64-5.0.3/bin/mongo
You can exit from the client with the command
exit and you can stop the server by pressing
CTRL+C