Skip to content

Instantly share code, notes, and snippets.

@tmtk75
Created August 5, 2015 11:56
Show Gist options
  • Save tmtk75/743f2bec1e36af173eea to your computer and use it in GitHub Desktop.
Save tmtk75/743f2bec1e36af173eea to your computer and use it in GitHub Desktop.
mkdir -p a0
mkdir -p a1
mkdir -p a2
mkdir -p b0
mkdir -p b1
mkdir -p b2
mkdir -p c0
mkdir -p c1
mkdir -p c2
mkdir -p d0
mkdir -p d1
mkdir -p d2
mkdir -p cfg0
mkdir -p cfg1
mkdir -p cfg2
mongod --configsvr --dbpath cfg0 --port 26050 --fork --logpath log.cfg0 --logappend
mongod --configsvr --dbpath cfg1 --port 26051 --fork --logpath log.cfg1 --logappend
mongod --configsvr --dbpath cfg2 --port 26052 --fork --logpath log.cfg2 --logappend
mongod --shardsvr --replSet a --dbpath a0 --logpath log.a0 --port 27000 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet a --dbpath a1 --logpath log.a1 --port 27001 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet a --dbpath a2 --logpath log.a2 --port 27002 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet b --dbpath b0 --logpath log.b0 --port 27100 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet b --dbpath b1 --logpath log.b1 --port 27101 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet b --dbpath b2 --logpath log.b2 --port 27102 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet c --dbpath c0 --logpath log.c0 --port 27200 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet c --dbpath c1 --logpath log.c1 --port 27201 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet c --dbpath c2 --logpath log.c2 --port 27202 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet d --dbpath d0 --logpath log.d0 --port 27300 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet d --dbpath d1 --logpath log.d1 --port 27301 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet d --dbpath d2 --logpath log.d2 --port 27302 --fork --logappend --smallfiles --oplogSize 50
mongos --configdb Tomotaka-no-MacBook-Air.local:26050,Tomotaka-no-MacBook-Air.local:26051,Tomotaka-no-MacBook-Air.local:26052 --fork --logappend --logpath log.mongos0
mongos --configdb Tomotaka-no-MacBook-Air.local:26050,Tomotaka-no-MacBook-Air.local:26051,Tomotaka-no-MacBook-Air.local:26052 --fork --logappend --logpath log.mongos1 --port 26061
mongos --configdb Tomotaka-no-MacBook-Air.local:26050,Tomotaka-no-MacBook-Air.local:26051,Tomotaka-no-MacBook-Air.local:26052 --fork --logappend --logpath log.mongos2 --port 26062
mongos --configdb Tomotaka-no-MacBook-Air.local:26050,Tomotaka-no-MacBook-Air.local:26051,Tomotaka-no-MacBook-Air.local:26052 --fork --logappend --logpath log.mongos3 --port 26063
echo
ps -A | grep mongo
echo
tail -n 1 log.cfg0
tail -n 1 log.cfg1
tail -n 1 log.cfg2
echo
tail -n 1 log.a0
tail -n 1 log.a1
tail -n 1 log.a2
tail -n 1 log.b0
tail -n 1 log.b1
tail -n 1 log.b2
tail -n 1 log.c0
tail -n 1 log.c1
tail -n 1 log.c2
tail -n 1 log.d0
tail -n 1 log.d1
tail -n 1 log.d2
echo
tail -n 1 log.mongos0
tail -n 1 log.mongos1
tail -n 1 log.mongos2
tail -n 1 log.mongos3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment