Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install ElasticSearch on Debian
VERSION=0.20.6
sudo apt-get update
sudo apt-get install openjdk-6-jdk
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb
sudo dpkg -i elasticsearch-$VERSION.deb
# be sure you add "action.disable_delete_all_indices" : true to the config!!
# start script
sudo /etc/init.d/elasticsearch restart
# ------------------------------------------------------------------------------------
# if you want to remove it:
#sudo dpkg -r elasticsearch
# binaries & plugin
#/usr/share/elasticsearch/bin
# log dir
#/var/log/elasticsearch
# data dir
#/var/lib/elasticsearch
# config dir
#/etc/elasticsearch
# prepare ElasticSearch UI
#sudo apt-get install apache2
#sudo mkdir /var/www/ui
#sudo chown -R ubuntu.www-data /var/www
# now copy ES-HEAD to /var/www/ui
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["xy2.compute.amazonaws.com"]
# and on other node use:
# discovery.zen.ping.unicast.hosts: ["xy1.compute.amazonaws.com"]
# to use ec2 api (you need the security keys!) for discovery you need to install the aws plugin
# read
# http://www.elasticsearch.org/tutorials/2011/08/22/elasticsearch-on-ec2.html
# http://www.elasticsearch.org/guide/reference/modules/discovery/ec2.html
@Touchpad

This comment has been minimized.

Copy link

@Touchpad Touchpad commented Sep 17, 2013

great help thank you

@podolinek

This comment has been minimized.

Copy link

@podolinek podolinek commented Feb 12, 2015

Great. Thanks a lot!

@j-norwood-young

This comment has been minimized.

Copy link

@j-norwood-young j-norwood-young commented Apr 15, 2015

Elasticsearch v1.4.4 wouldn't load on OpenJDK 6. I fixed it as follows:

apt-get install openjdk-7-jdk
rm /etc/alternatives/java
ln -s /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java /etc/alternatives/java

If you haven't already installed OpenJDK 6, you could probably just apt-get install openjdk-7-jdk.

I also ended up using the repo as per http://www.elastic.co/guide/en/elasticsearch/reference/1.4/setup-repositories.html

@moebiuseye

This comment has been minimized.

Copy link

@moebiuseye moebiuseye commented Oct 14, 2015

sudo apt-get install openjdk-6-jdk -> Why install the jdk? Why not the jre? (the headless version?) You're installing to a server right?
I'd install openjdk6-jre-headless and I'm pretty sure it would work just fine. (With way lesser dependencies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment