Hands-on Introduction to Elasticsearch — I

Jitendra Agrawal
Sep 16, 2018 · 3 min read
$ sudo apt-get install openjdk-8-jre-headless
Download Elasticsearch tarball
$ tar -xvzf elasticsearch-6.4.0.tar.gz
Change directory
$ cd elasticsearch-6.4.0
Start Elasticsearch with default parameters
$ ./bin/elasticsearch
Start elasticsearch in a cluster
$ ./bin/elasticsearch -Ecluster.name=elastic_tutorial -Enode.name=first_es
NOTE: Move to another shell at this point.Check health of the 'single node' cluster
$ curl localhost:9200
Output
{
"name" : "first_es",
"cluster_name" : "elastic_tutorial",
"cluster_uuid" : "RAlDJFAJTiugQ_CI_77s4A",
"version" : {
"number" : "6.4.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "595516e",
"build_date" : "2018-08-17T23:18:47.308994Z",
"build_snapshot" : false,
"lucene_version" : "7.4.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
$ curl localhost:9200/_cat/health$ curl localhost:9200/_cat/health?v\&pretty
1537106759 14:05:59 elastic_tutorial green 1 1 0 0 0 0 0 0 - 100.0%
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1537105314 13:41:54 elastic_tutorial green 1 1 0 0 0 0 0 0 - 100.0%
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade