Although you could use command-line options to bring up members of a replica set, aside from temporary testing and development, the preferred approach would be to add the appropriate replication options to the mongod.conf file for each member of the replica set.
The following table summarizes the more important options:
mongod.conf Directive | Command Line | Notes |
net.bindIp | --bind_ip | The mongod instance running on each replica set member must be configured to listen either on a specific IP address or all IP addresses. This is required so that replica set members can both synchronize data and send each other heartbeat transmissions. |
replication.oplogSizeMB | --oplogSize | If desired, define this setting with an integer value representing the desired oplog size in megabytes. In order for this directive to be effective, the option needs to be set before the replica set is first initialized. The replSetResizeOplog administrative method ... |