Configuring MongoDB in a PLOSSYS 5 System¶
Configuring a Shared Replica Set¶
For the communication with the PLOSSYS 5 system configure a shared replica set:
-
Edit the MongoDB configuration file:
/opt/seal/etc/mongod.conf
-
Change the following line:
bindIp: 127.0.0.1
to:
bindIp: 0.0.0.0
-
Add the following lines:
replication: oplogSizeMB: 2048 replSetName: <YourReplicaSetName>
Hint -
oplogSizeMB
We recommend setting
oplogSizeMB
to 5 % of the disk space available for MongoDB. -
Restart the MongoDB:
mongod
Initializing the Database¶
-
Initialize the database:
sudo mongo --ssl --sslAllowInvalidCertificates --sslAllowInvalidHostnames --eval "rs.initiate()"
The output has to contain the following line:
"ok" : 1