Mongod with basic command line

/To launch one’s own mongod with a few basic command line arguments/
This is simply put out of my reach. I have tried a number CMD.exe but to no avail.
I will still try but would want some indication to complete.

Thank you

Hi Paulandredupuis,

Basic mongod command requires:

  • You can simply run mongod, it will wait for connections on port 27017. It will take bydefault arguments like dbpath: /data/db, and port 27017.
    To run mongo shell, run mongo, it will start mongo shell.

  • If you are talking about how to specify requirements in a config file, here is the sample config file:


dbPath: /var/lib/mongodb
enabled: true

destination: file
logAppend: true
path: /var/log/mongodb/mongod.log

port: 27017

To run mongod, mongod -f mongod_conf.yaml [ or you can use --config as well ]

Detail documentation can be found here