-
-
Save dylan4224/d0f3c6fc3e7eff6b5fd8 to your computer and use it in GitHub Desktop.
testmongo
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
sudo apt-get update | |
sudo apt-get install openjdk-6-jre-headless -f | |
sudo apt-get install curl | |
sudo apt-get install unzip | |
sudo apt-get install openssh-server | |
sudo curl -OL http://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.8.zip | |
sudo unzip elasticsearch-* && rm elasticsearch-*.zip | |
cd elasticsearch-0.19.8 | |
sudo mkdir /usr/local/elasticsearch | |
sudo mv * /usr/local/elasticsearch | |
sudo wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.7.tgz | |
sudo tar zxf mongodb-linux-* | |
cd mongodb-linux-x86_64-2.0.7/bin | |
sudo mv * /usr/bin/ | |
sudo mkdir -p /data/r0 | |
sudo mkdir -p /data/r1 | |
sudo mkdir -p /data/r2 | |
user=$(logname) | |
sudo chown $user /data/r0 | |
sudo chown $user /data/r1 | |
sudo chown $user /data/r2 | |
sudo /usr/bin/mongod --replSet foo --port 27017 -fork --quiet --dbpath /data/r0 --logpath /var/log/mongodb0.log | |
sudo /usr/bin/mongod --replSet foo --port 27018 -fork --quiet --dbpath /data/r1 --logpath /var/log/mongodb1.log | |
sudo /usr/bin/mongod --replSet foo --port 27019 -fork --quiet --dbpath /data/r2 --logpath /var/log/mongodb2.log | |
sudo /usr/local/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments | |
sudo /usr/local/elasticsearch/bin/plugin -install richardwilly98/elasticsearch-river-mongodb | |
sudo /usr/local/elasticsearch/bin/plugin -install mobz/elasticsearch-head | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment