Skip to content

Commit

Permalink
mongo docs
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsiryk committed Jun 17, 2020
1 parent 1268ec3 commit 5e5d62b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mongodb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ MongoDB
Replication::

# run minimum 3 mongo nodes
# execute next command on the one node
# execute next command on the one node
rs.initiate({_id: "rs1", members: [{_id: 0, host: "mongo1:27017" }, {_id: 1, host: "mongo2:27017"}, {_id: 2, host: "mongo3:27017"}]});

# or
mongo --quiet --eval "rs.initiate({_id: 'rs1', members: [{_id: 0, host: 'mongo1:27017' }, {_id: 1, host: 'mongo2:27017'}, {_id: 2, host: 'mongo3:27017'}]});"

# check conf
rs.conf()

Expand Down

0 comments on commit 5e5d62b

Please sign in to comment.