How to install ElasticSearch on CentOS 7

“Elasticsearch is a search engine based on Lucene. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License”

This tutorial will show you how to install ElasticSearch on CentOS 7. The version of ElaistcSearch we use is, 1.7.3.

Step 1

We download openJDK by running:

  • sudo yum install java-1.8.0-openjdk.x86_64

Step 2

Next we will get the elasticsearch package by running:

  • sudo wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.3.noarch.rpm

Step 3

We will then install it by running the following command:

  • sudo rpm -ivh elasticsearch-1.7.3.noarch.rpm

Step 4

We will then start and configure the elasticsearch service by running the following commands.

  • sudo service elasticsearch start
  • sudo service elasticsearch status
  • sudo chkconfig elasticsearch on

Step 5

We will now check that elasticsearch is working as we expect. We will navigate to localhost over port 9200 (the default port for elasticsearch)

  • sudo wegt localhost:9200
  • cat index.html

The output of this file should look similar to the below.

{
"status" : 200,
"name" : "Lockjaw",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.3",
"build_hash" : "05d4530971ef0ea46d0f4fa6ee64dbc8df659682",
"build_timestamp" : "2015-10-15T09:14:17Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}

A full video tutorial can be found here:

 

2 thoughts on “How to install ElasticSearch on CentOS 7

Leave a Reply

Your email address will not be published. Required fields are marked *