Introduction
MongoDB is a flexiable & sca scalable NoSQL database, which makes it perfect for businesses of all sizes. It works with UNIX-like systems and macOS, and also on Windows systems. Installing MongoDB on Windows application is a little bit tricky task. But, this step-by-step tutorial explains how to install and configure the MongoDB on your PC.
Prerequisites
The MongoDB Server – Download
Use the Setup Wizard
'msi'
installer by double-clicking on it.Choose the kind of installation you need
you can choose either a Complete installation to install all the features. This is the recommended option. Alternatively, you can choose a Custom installation. It’s the option where you can pick the features you want to install. If you’re unsure, try with the Complete option.
Configure MongoDB Service
Store MongoDB databases
To store the MongoDB databases, you need a folder in C:\
Drive which name should be data
and then again create new folder within it name should be db
Make 'mongod' Alias Shortcuts
We use Hyper Terminal to Make mongod Alias Shortcuts.
Git Bash is the default shell application to use to access the Hyper Terminal.
cd~
to do that.
1 | cd ~ |
1 | touch .bash_profile |
1 | alias mongod="/c/Program\ files/MongoDB/Server/4.4/bin/mongod.exe" |
Restart the MongoDB Service
You’ve successfully created the alias path, now it’s time to restart the service. Restart your Gitbash & just type
1
mongo --version
1 | mongo --version |