Skip to content

Instantly share code, notes, and snippets.

@sarjarapu
Created May 28, 2018 20:14
Show Gist options
  • Save sarjarapu/3f47a20a51a84eb4fe91cbb3895f8f06 to your computer and use it in GitHub Desktop.
Save sarjarapu/3f47a20a51a84eb4fe91cbb3895f8f06 to your computer and use it in GitHub Desktop.
A bash script with download MongoDB v4.0 release candidate and create a 1 member replica set
curl -O https://downloads.mongodb.com/osx/mongodb-osx-x86_64-enterprise-4.0.0-rc0.tgz
tar -xvzf mongodb-osx-x86_64-enterprise-4.0.0-rc0.tgz
rm mongodb-osx-x86_64-enterprise-4.0.0-rc0.tgz
mv mongodb-osx-x86_64-enterprise-4.0.0-rc0 v4.0.0-rc0
mkdir data
v4.0.0-rc0/bin/mongod --dbpath data --logpath data/mongod.log --fork --replSet rs0 --port 38000
v4.0.0-rc0/bin/mongo --port 38000 --eval "rs.initiate()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment