Skip to content

Instantly share code, notes, and snippets.

@kivanio
Last active January 27, 2017 17:57
Show Gist options
  • Save kivanio/6150dacaf2f0e6843c03b74c47e4c939 to your computer and use it in GitHub Desktop.
Save kivanio/6150dacaf2f0e6843c03b74c47e4c939 to your computer and use it in GitHub Desktop.
sudo service elasticsearch stop
if ! [ -e .semaphore-cache/elasticsearch-2.4.4.deb ]; then (cd .semaphore-cache; curl -OL https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.4/elasticsearch-2.4.4.deb); fi
echo Y | sudo dpkg -i .semaphore-cache/elasticsearch-2.4.4.deb
sudo sh -c "echo 'script.inline: true' >> /etc/elasticsearch/elasticsearch.yml"
sudo sh -c "echo 'script.groovy.sandbox.enabled: true' >> /etc/elasticsearch/elasticsearch.yml"
sudo sh -c "echo 'index.number_of_replicas: 0' >> /etc/elasticsearch/elasticsearch.yml"
sudo sh -c "echo 'index.number_of_shards: 1' >> /etc/elasticsearch/elasticsearch.yml"
sudo service elasticsearch start
sleep 10 && curl -XGET 'localhost:9200'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment