Setting Up the MongoDB Server

  • Step 1: Open click on downloads and select the suitable version   
  • Step 2: Unzip into a directory and we can find a bunch of executable files. 
Before we would run mongo server for first time we need to create a directory where the data files will reside .The default name for the directory is data.
Type the command
Once the directory exists we can simply run the mongo server without any more command line arguments..
Type: mongod
where d is the daemon
Mongo has started intialise data in that directory and it is up and running open on port 27017. we can start it using now.
we can find more options through command
mongd --help | more