Launching mongod instance with requirements

How do I specify the requirements when I launch mongod?

Hi Ben,

Not sure if I understand your question.

  • 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


What Im asking is, how exactly do I create the actual file. I know what to put in it. I know how to create a file in terminal with “touch” but how to I write this code into this file from terminal since the file is not actually on my local machine and therefore doesnt appear in finder. This process is not explained at all