Friday, June 20, 2014

Install ElasticSearch in Ubuntu 14.04 server

Friday, June 20, 2014 Posted by Andre Broers , , 13 comments

This is how I installed ElasticSearch on my Ubuntu box

sudo apt-get install openjdk-7-jre-headless -y
sudo wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -

Add the following line to /etc/apt/sources.list

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

sudo apt-get update
sudo apt-get install elasticsearch
sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start

curl http://127.0.0.1:9200
{
  "status" : 200,
  "name" : "Kiber the Cruel",
  "version" : {
    "number" : "1.3.2",
    "build_hash" : "dee175dbe2f254f3f26992f5d7591939aaefd12f",
    "build_timestamp" : "2014-08-13T14:29:30Z",
    "build_snapshot" : false,
    "lucene_version" : "4.9"
  },
  "tagline" : "You Know, for Search"

}


13 comments:

  1. Hi !

    I had to prepend sudo also before the apt-key command, in order to make it run.

    sudo wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -

    Else I got a

    ERROR: This command can only be used by root.

    Cheers

    ReplyDelete
  2. Hi,

    Please note that version 1.3 is currently available, so you can change it in the repository URL :)

    ReplyDelete
  3. Hi, i did it and work like a charm... but after some time (5 min, 10 min) ELK stop working, service look dead, port not listening and kibana can't connect.

    I'm on a Azure VM STD A0 (smallest one)

    On what VM you test it?
    Did you experience this issue?

    thanks

    ReplyDelete
    Replies
    1. I work on azure shared vm too. Works like a charm.
      I don't use kibana and I have installed swap space to the vm like I described in this article:

      http://blog.bekijkhet.com/2014/08/add-swap-space-to-azure-ubuntu-iaas-vm.html

      Delete
  4. Hi!
    Please, how can I install plugins for elasticsearch?
    Thx

    ReplyDelete
  5. Hi!

    For ES plugin installation you can try this repository infomation.
    https://github.com/tavisto/elasticsearch-rpms

    ReplyDelete