Created
October 6, 2012 01:32
-
-
Save shawnburke/3843385 to your computer and use it in GitHub Desktop.
Setting up MongoDB on an EC2 Instance
This file contains hidden or 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
| MONGO_BASE=~/mongodb/ | |
| MONGO_DB=~/mongodb/db | |
| MONGO_DUMP=~/mongodb/dump | |
| MONGO_INSTALL=~/mongodb/bin | |
| MONGO_VERSION=2.2.0 | |
| mkdir -p $MONGO_BASE | |
| mkdir -p $MONGO_DB | |
| mkdir -p $MONGO_DUMP | |
| cd $MONGO_BASE | |
| echo Downloading mongodb $MONGO_VERSION | |
| T=mongodb-linux-x86_64-$MONGO_VERSION | |
| curl -O http://fastdl.mongodb.org/linux/$T.tgz | |
| echo Unpacking... | |
| tar -xzf $T.tgz | |
| rm $T.tgz | |
| mkdir -p $MONGO_INSTALL | |
| mv $T/bin/* $MONGO_INSTALL | |
| rm -r $MONGO_BASE/$T | |
| echo Mongo install complete. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The MongoDB AMIs from 10gen make this really easy... https://aws.amazon.com/marketplace/pp/B0087GMEQ2/ref=srh_res_product_title Plus they hook into the 10Gen rpm repositories for easy updates. :)