In this tutorial, we will explain How to install Elasticsearch on CentOS. Elasticsearch is a search engine based on the Lucene library. 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. Following an open-core business model, parts of the software are licensed under various open source licenses (mostly the Apache License), while other parts fall under the commercial (source-available) Elastic License.


You will need:

  • VPS running CentOS

Step 1 – Install OpenJDK

Elasticsearch is written in Java programming language so it’s needed to install. To install run this command:

yum install java-1.8.0-openjdk.x86_64

Step 2 – Download Elasticsearch RPM

Now download the Elasticsearch RPM file by running this command:


Step 3 – Install Elasticsearch

Now its time to install Elasticsearch. Install it by running rpm file:

rpm -ivh elasticsearch-6.7.0.rpm

After you need to enable Elasticsearch:

systemctl enable elasticsearch.service

And to start it:

systemctl start elasticsearch.service

Step 4 – Test Elasticsearch

Now you can test Elasticsearch by running this command:

curl -X GET 'http://localhost:9200'


You have successfully installed Elasticsearch on CentOS.

Enjoy it.