Single Node Installation for Elastic Search

Hi ElasticSearch Viewers,

This material gives the Installation steps and basic Insert and Read in Elastic Search. Install Elastic search in your machine and start your process.

1. Download Elastic Search
Download Elastic Search from the below link. Visit Elastic Search official web Site for latest version of Elastic Search


2. Download Java
Download JDK from the below link. Find the latest version from Oracle web Site

Java – 8 Download (Elastic Search supported for Java 8 version)


3. Untar Elastic Search and Java

$ tar -zxvf elasticsearch-1.5.2.tar.gz
$ tar -zxvf Jdk1.8.0_45.tar.gz

4. Environmental setup

$ vi .bashrc

export JAVA_HOME=/home/saravanan/jdk1.8.0_45
export ELASTICSEARCH_HOME=/home/saravanan/elasticsearch-1.5.2

$ source .bashrc

5. Starting Elastic Search

$ cd elasticsearch-1.5.2
$ bin/elasticsearch
$ jps

Browser : localhost:9200


6. ElasticSearch-Head Plugin

ElasticSearch-Head Plugin provides a UI for Elastic Search. Before downloading, stop the running Elastic Search and then download plugin.

To Download:

$ cd elasticsearch-1.5.2
$ bin/plugin –install mobz/elasticsearch-head
$ bin/elasticsearch &

All Done, just need to verify setup. ElasticSearch works on port number 9200.

Browser : localhost:9200/_plugin/head/

7. ElasticSearch Sample Tutorial

Download Curl
Curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP).

$sudo apt-get install curl

Below examples helps to add, get and search data in ElasticSearch

Creating Bucket
$curl -XPUT http://localhost:9200/mybucket

To add Data in Elastic Search
$curl -XPOST ‘http://localhost:9200/mybucket/test1′ -d ‘{ “message”:”Hello World” }’

To GET Data from Elastic Search and Read the output
$curl -XGET ‘http://localhost:9200/mybucket/test1’

Browser : http://localhost:9200/mybucket/test1


Article written by DataDotz Team

DataDotz is a Chennai based BigData Team primarily focussed on consulting and training on technologies such as Apache Hadoop, Apache Spark , NoSQL(HBase, Cassandra, MongoDB), Search and Cloud Computing.

Note: DataDotz also provides classroom based Apache Kafka training in Chennai. The Course includes Cassandra , MongoDB, Scala and Apache Spark Training. For more details related to Apache Spark training in Chennai, please visit