How to Install Elasticsearch 6 on CentOS 7 with Kibana Data Visualization tool

(: November 19, 2018)

Elasticsearch is a highly scalable open-source full-text search and analytics engine tool which helps you to store, search, and analyze big volumes of data in near real time. In this guide, I’ll show you the steps to install Elasticsearch 6 on CentOS 7 with Kibana to serve as Elastisearch Dashboard. Kibana lets you visualize your Elasticsearch data and navigate the Elastic Stack

How to Install Elasticsearch 6 on CentOS 7

As Elasticsearch depends on Java, you need it installed on your machine prior to installing Elasticsearch 6 on CentOS 7.

sudo yum install java-openjdk-devel java-openjdk

After it is installed, set Java environment variables{text-align:left} img{margin:0 auto 0 0}
cat > /etc/profile.d/ <<EOF 
export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

Add Elasticsearch 6 repository:

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

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

sudo yum install elasticsearch

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

Start and enable elasticsearch service on boot:

$ sudo systemctl start elasticsearch
$ sudo systemctl enable elasticsearch
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/elasticsearch.service.

Test to verify that it is working:

# curl 
  "name" : "z55vMi1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "AdPjPVvWRkOZKC0ADLarXw",
  "version" : {
    "number" : "6.3.2",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "053779d",
    "build_date" : "2018-07-20T05:20:23.451332Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "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 CentOS 7

sudo yum install kibana

After a successful installation, configure Kibana

$ sudo vim /etc/kibana/kibana.yml "" ""
elasticsearch.url: "http://localhost:9200"

Change other settings as desired then start kibana service:

sudo systemctl start kibana
sudo systemctl enable 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

For Ubuntu users, check How to Install Elasticsearch 5.x on Ubuntu 18.04 LTS (Bionic Beaver) Linux{text-align:left} img{margin:0 auto 0 0}