Skip to content

Instantly share code, notes, and snippets.

@oliveiracdz
Created December 3, 2021 15:44
Show Gist options
  • Save oliveiracdz/2649b487739dcda4e4d509d7c66f0217 to your computer and use it in GitHub Desktop.
Save oliveiracdz/2649b487739dcda4e4d509d7c66f0217 to your computer and use it in GitHub Desktop.
  1. sudo nano /opt/bitnami/mongodb/conf/mongodb.conf

Habilitar replicaSet name

# replica set options
replication:
  replSetName: rs0

Desabilitar security

#security options
#security:
  #authorization: enabled
  #keyFile: replace_me

Configurar replicaSet

mongo <<EOF
var cfg = {
   "_id":"rs0",
   "version":1,
   "members":[
      {
         "_id":0,
         "host":"${MONGODB1}:27017"
      }
   ]
};
rs.initiate(cfg);
EOF
  1. sudo /opt/bitnami/ctlscript.sh restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment