Install Elasticsearch on Ubuntu
11 Nov 2015We need Java to run Elasticsearch, so let’s install Java first.
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
Download and install Elasticsearch, for latest version visit Elasticsearch download page
$ wget https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.0.0/elasticsearch-2.0.0.deb
$ sudo dpkg -i elasticsearch-2.0.0.deb
To start Elasticsearch on boot, we need to execute this command
$ sudo update-rc.d elasticsearch defaults 95 10
Now, let’s run Elasticsearch
$ sudo /etc/init.d/elasticsearch start
Test it out by running the following:
$ curl http://localhost:9200
If everything works, you’ll get something like this
{
"name" : "Alcmena",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.0.0",
"build_hash" : "de54438d6af8f9340d50c5c786151783ce7d6be5",
"build_timestamp" : "2015-10-22T08:09:48Z",
"build_snapshot" : false,
"lucene_version" : "5.2.1"
},
"tagline" : "You Know, for Search"
}