March 2019
Intermediate to advanced
394 pages
11h 4m
English
Starting a MongoDB server as a part of a replica set is as easy as setting it in the configuration via the command line:
> mongod --replSet "xmr_cluster"
This is fine for development purposes. For production environments, it's recommended that we use a configuration file instead:
> mongod --config <path-to-config>
Here, the <path-to-config> can be as follows:
/etc/mongod.conf
This configuration file has to be in a YAML format.
A simple configuration file sample is as follows:
systemLog: destination: file path: "/var/log/mongodb/mongod.log" logAppend: truestorage: journal: enabled: trueprocessManagement: fork: truenet: bindIp: 127.0.0.1 ...
Read now
Unlock full access