3

Install Elasticsearch 6 on CentOS 7 with Kibana Data Visualization tool

 2 years ago
source link: https://computingforgeeks.com/install-elasticsearch-6-centos-7-kibana/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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:

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK