(Last Updated On: January 2, 2019)

How can I install Elasticsearch on RHEL 8?. This guide will help you to install Elasticsearch 6 / Elasticsearch 5 on RHEL 8. Elasticsearch is an open source full-text search and analytics engine tool used to store, search, and analyze big volumes of data in near real time.

Step 1: Install Java on RHEL 8

As Elasticsearch depends on Java, you need it installed on your system prior to installing Elasticsearch 6 or 5 on RHEL 8.

How to Install Java 11 (OpenJDK 11) on RHEL 8

How to Install Elasticsearch 6 on RHEL 8

To install Elasticsearch 6 on RHEL 8, add its repository to your system.

cat > /etc/yum.repos.d/elasticsearch.repo <<EOF
name=Elasticsearch repository for 6.x packages

For Elasticsearch 5.x, add:

cat > /etc/yum.repos.d/elasticsearch.repo <<EOF
name=Elasticsearch repository for 5.x packages

Once the repository is added, clear and update your YUM package index.

sudo yum clean all
sudo yum makecache

Elasticsearch 6 repository is ready for use. You can install Elasticsearch using the command below:

sudo yum install elasticsearch

Confirm package installation.

$ rpm -qi elasticsearch 
Name : elasticsearch
Epoch : 0
Version : 6.5.4
Release : 1
Architecture: noarch
Install Date: Wed 02 Jan 2019 02:12:22 PM EAT
Group : Application/Internet
Size : 167695796
License : Elastic License
Signature : RSA/SHA512, Tue 18 Dec 2018 01:18:33 AM EAT, Key ID d27d666cd88e42b4
Source RPM : elasticsearch-6.5.4-1-src.rpm
Build Date : Tue 18 Dec 2018 12:21:58 AM EAT
Build Host : packer-virtualbox-iso-1542822913
Relocations : /usr
Packager : Elasticsearch
Vendor : Elasticsearch
URL : https://www.elastic.co/
Summary : Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
Description :
Elasticsearch subproject :distribution:packages

You can set JVM options like memory limits by editing the file: /etc/elasticsearch/jvm.options

Example below sets initial/maximum size of total heap space


If your system has less memory, you can configure it to use small megabytes of ram.


Start and enable elasticsearch service on boot:

$ sudo systemctl enable --now elasticsearch.service 
Synchronizing state of elasticsearch.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /usr/lib/systemd/system/elasticsearch.service.

Test to verify that it is working:

$ curl 
"name" : "bBzN5Kg",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "LKyqXXSvRvCpX9QAwKlP2Q",
"version" : {
"number" : "6.5.4",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "d2ef93d",
"build_date" : "2018-12-17T21:17:40.758843Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
"tagline" : "You Know, for Search"

Create a test index:

$ curl -X PUT ""

Install Kibana on RHEL 8

If you need to install Kibana visualization tool, run the command below in your terminal.

sudo yum install kibana

After a successful installation, configure Kibana:

$ sudo vim /etc/kibana/kibana.yml
server.host: ""
server.name: "kibana.example.com"
elasticsearch.url: "http://localhost:9200"

Change other settings as desired then start kibana service:

sudo systemctl enable --now kibana

Access http://ip-address:5601 to open Kibana Dashboard:

If you have an active firewall, you’ll need to allow access to Kibana port:

sudo firewall-cmd --add-port=5601/tcp --permanent
sudo firewall-cmd --reload

You now have Elasticsearch 6 or Elasticsearch 5 on RHEL 8. Also read:

How to delete Elasticsearch Index data with curl