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

Add Elasticsearch 6 repository:

cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/oss-6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

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

sudo yum install elasticsearch-oss

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 enable --now elasticsearch

Test to verify that it is working:

$ curl -XGET 'http://localhost:9200/_cat/master'
_9iJ9GPcR3CjwsZZPYzMbQ 127.0.0.1 127.0.0.1 _9iJ9GP

$ curl -XGET 'http://localhost:9200/_cat/nodes'
127.0.0.1 8 95 2 0.33 0.18 0.08 mdi * _9iJ9GP

Create a test index:

$ curl -X PUT "http://127.0.0.1:9200/mytest_index"
{"acknowledged":true,"shards_acknowledged":true,"index":"mytest_index"}

Install Kibana on CentOS 7

Install Kibana open source:

sudo yum install kibana-oss

After a successful installation, configure Kibana

$ sudo vi /etc/kibana/kibana.yml
server.host: "0.0.0.0"
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:

elasticsearch kibana centos7 min

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

Video course content:

For Cluster setup, check: Setup Elasticsearch Cluster on CentOS / Ubuntu With Ansible

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here