How to install elasticsearch and kibana in docker

How to install elasticsearch and kibana in docker

1. Install elasticsearch

pull elasticsearch image

docker pull elasticsearch 

Creating a Handoff Mode Network

docker network create elasticsearch_net

Install

docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 --network elasticsearch_net -v elasticsearch_volume:/root -e "privileged=true" -e "discovery.type=single-node" elasticsearch

# -d background run# --name elasticsearch container name# -p 9200:9200 -p 9300:9300 mapping port# --network elasticsearch_net specifies the network# -v elasticsearch_volume:/root named shared directory# -e "privileged=true" configures access rights# -e "discovery.type=single-node" specifies elasticsearch deployment mode# elasticsearch specifies the image----
# -v elasticsearch_volume:/root named shared directory# -e "privileged=true" Configure access permissions. If access permissions are not configured at the beginning, es will not start up. After adding permissions, it can start up 

Modify the configuration

echo 'http.cors.allow-origin: "*"' >> elasticsearch.yml
echo "http.cors.enabled: true" >> elasticsearch.yml

Restart es

docker restart elasticsearch

Install ik tokenizer

Download the same version of the ik word segmenter zip package through a shared directory or directly wget, link


Unzip to the /usr/share/elasticsearch/plugins directory

Restart es

docker restart elasticsearch
In the startup log, you can see that the ik word segmenter plug-in is loaded 

Install Kibana

Docker pulls the kibana 5.6.12 image

docker pull kibana:5.6.12 

Run kibana

docker run -d --name kibana --network elasticsearch_net -e ELASTICSEARCH_URL=http://192.168.159.3:9200 -p 5601:5601 kibana:5.6.12

Access kibana

Install elasticsearch-head

docker pull mobz/elasticsearch-head:5
docker run -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5 

This is the end of this article about the steps to install elasticsearch and kibana in docker. For more information about installing elasticsearch and kibana in docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Problems and solutions for installing ElasticSearch and Kibana in Docker
  • Implementation of docker installation of elastic search and kibana

<<:  The difference between key and index in MySQL

>>:  Detailed explanation of the this pointing problem in JavaScript

Recommend

How to use mysqladmin to get the current TPS and QPS of a MySQL instance

mysqladmin is an official mysql client program th...

Tutorial on resetting the root password of Mac MySQL

Disclaimer: This password reset method can direct...

Installing Win10 system on VMware workstation 14 pro

This article introduces how to install the system...

Detailed explanation of the use of Vue.js draggable text box component

Table of contents Registering Components Adding C...

MySQL slave library Seconds_Behind_Master delay summary

Table of contents MySQL slave library Seconds_Beh...

Analysis of the principles of Mysql dirty page flush and shrinking table space

mysql dirty pages Due to the WAL mechanism, when ...

Vue/react single page application back without refresh solution

Table of contents introduction Why bother? Commun...

Detailed explanation of the use of MySQL Online DDL

Table of contents text LOCK parameter ALGORITHM p...

MySQL master-slave data is inconsistent, prompt: Slave_SQL_Running: No solution

This article uses an example to describe the solu...

The principle and direction of JavaScript this

How to determine what this points to? ①When calle...

Linux completely removes node.js and reinstalls it through the yum command

first step Delete it once with the built-in packa...

How to use Navicat to operate MySQL

Table of contents Preface: 1. Introduction to Nav...