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:
storage: dbPath: /var/lib/mongodb journal: enabled: true systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log net: port: 27017 bindIp: 127.0.0.1
To run mongod, mongod -f mongod_conf.yaml
[ or you can use --config
as well ]
-
If you want to provide command line parameters, here is one example:
mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
Detail documentation can be found here
Kanika
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