使用特定配置檔案啟動 mongo

使用 --config 標誌。

$ /bin/mongod --config /etc/mongod.conf
$ /bin/mongos --config /etc/mongos.conf

請注意,-f 是 --config 的較短同義詞。