Saturday, December 31, 2016

How to install ElasticSearch on Ubuntu

Elasticsearch is a powerful search engine tool for any application that needs relevance search, which simply can't be done using relational databases query. For learning purpose you can setup elasticsearch on your local computer.

Ideally for production, your elasticsearch should be hosted somewhere online, but for learning purpose why don't we just install elasticsearch on our ubuntu. Installing elasticsearch on ubuntu is pretty easy.

For this tutorial i'm going to install elasticsearch version 2.3.3 on ubuntu 16.04.

Step by step how to install elasticsearch on ubuntu 16.04
  • Make sure you have java installed on your system, you can use either oracle JDK or open JDK
  • Download elasticsearch debian package version 2.3.3
  • Install the debian package with this command:
  • sudo dpkg -i elasticsearch-2.3.3.deb
  • Start the elasticsearch service
  • sudo service elasticsearch start
  • Make sure the service is up and running
  • sudo service elasticsearch status
  • Run your first elasticsearch request
  • curl 'http://localhost:9200/?pretty'
Now that you have elasticsearch running on your ubuntu, you can use curl on the command line to run the query or use tool like sense if you prefer to do it on graphical mode.

No comments:

Post a Comment