- sudo nano /opt/bitnami/mongodb/conf/mongodb.conf
# replica set options
replication:
replSetName: rs0
#security options
#security:
#authorization: enabled
#keyFile: replace_me
mongo <<EOF
var cfg = {
"_id":"rs0",
"version":1,
"members":[
{
"_id":0,
"host":"${MONGODB1}:27017"
}
]
};
rs.initiate(cfg);
EOF
- sudo /opt/bitnami/ctlscript.sh restart