Created
May 24, 2012 17:26
-
-
Save srs81/2782927 to your computer and use it in GitHub Desktop.
Bash script to start mongod and sharded server on EC2 instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create required directories | |
sudo mkdir /data | |
sudo mkdir /data/db | |
sudo mkdir /data/configdb | |
sudo mkdir /data/logs | |
# Give correct permissions | |
sudo chown -R ec2-user:ec2-user /data | |
# Start mongod server and shard server | |
# Persistent across logouts with nohup | |
nohup mongod --configsvr > /data/logs/config.log & | |
nohup mongod --shardsvr > /data/logs/shard.log & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment