Skip to content

Instantly share code, notes, and snippets.

@varavut varavut/a.sh
Created Apr 15, 2012

Embed
What would you like to do?
testmongo
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
You can’t perform that action at this time.