Skip to content

Instantly share code, notes, and snippets.

@djamelz
Last active October 6, 2015 12:25
Show Gist options
  • Save djamelz/79915bad27f0e215d141 to your computer and use it in GitHub Desktop.
Save djamelz/79915bad27f0e215d141 to your computer and use it in GitHub Desktop.
Script to install es 1.1 on ec2 ubuntu ami (sudo es.sh)
#!/bin/sh
cd /mnt/
apt-get -y update
apt-get -y install openjdk-7-jre
apt-get -y install zip
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.1.1.zip && unzip elasticsearch-1.1.1.zip && /mnt/elasticsearch-1.1.1/bin/plugin -install mobz/elasticsearch-head
/mnt/elasticsearch-1.1.1/bin/plugin -install elasticsearch/elasticsearch-cloud-aws/2.1.1
echo " network.bind_host: $(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')" >> /mnt/elasticsearch-1.1.1/config/elasticsearch.yml
screen -dmS new_screen sh
screen -S new_screen -X stuff "/mnt/elasticsearch-1.1.1/bin/elasticsearch
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment