MongoDB: Step-2: Setting up the server

Step2 — Server & Client set up

This covers the setting up of the server on the cloud, the options for mongo client, typical mongo replica setup.

MongoDB server (on local)

MongoDB is open-source and the community edition of the server is available for free download.

Download the mongo server as per your OS and follow the instructions as mentioned in the below link. You will be surprised by the size of MongoDB package and the ease of installation if you have gone through some of the RDBMS installations in the past.

--dbpath option points to your database directory. Create one folder for this, say it it “c:\data\db”

Run the below command to run a standalone server

“C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe” — dbpath=”c:\data\db”

Setting up the MongoDB Server on the cloud for training

For the purposes of learning, it is easy to get started using the Mongo Atlas Cloud configuration wizard which will set up a free instance of a mongo replica set in the cloud with a provider of your choice.

The process is very simple, go through the wizard which will allow you to make your choice of mongo setup. The set up will take a few minutes. You will also have to whitelist your IP to your cloud configuration as part of the wizard steps.

Download the mongo client of your choice which can be a command-line program or mongo compass. My choice of mongo client is Mongo Shell as it allows me the flexibility to run different types of queries. Save the URL given to you to connect to the remote mongo server instance for future use.

Mongo Clients

MongoCompass and MongoShell are the official mongo clients offered by MongoDB.

There are few others too like Robo-3T(formerly RoboMongo) which are faster than MongoCompass but their limitation as they don’t support all the security options as what MongoCompass provides.

MongoDB Ops Manager

Enterprise MongoDB comes with the MongoDB Ops Manager which offers various views and controls on the cluster. This helps you monitor your cluster and take appropriate action.

Link to Step3

All related links



Java Architect | MongoDB | Oracle DB| Application Performance Tuning | Design Thinking |

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sarada Sastri

Sarada Sastri

Java Architect | MongoDB | Oracle DB| Application Performance Tuning | Design Thinking |