Install Elasticsearch

How to install and set up Elasticsearch under Debian Linux

Add Elasticsearch repository:

Trust the respository key:

wget -qO - https://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -

Add the repository to /etc/apt/sources.list:

deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main

Update and install:

apt-get update
apt-get install elasticsearch

Configure /etc/elasticsearch/elasticsearch.yml and change the following entries:

cluster.name: mycluster
node.name: "mynode"
node.master: true
node.data: true
node.rack: myrack
network.host: 10.0.0.1
discovery.zen.ping.unicast.hosts: [ "myotherhost1", "myotherhost2" ]

Install elasticsearch-HQ plugin:

cd /usr/share/elasticsearch/bin 
./plugin -install royrusso/elasticsearch-HQ

Start Elasticsearch:

/etc/init.d/elasticsearch start

Address in your browser http://myhost:9200/_plugin/HQ/

Enable IP-Forwarding in /etc/sysctl.conf to access the address from another network:

net.ipv4.ip_forward = 1