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

MySQL slow query pt-query-digest analysis of slow query log

1. Introduction pt-query-digest is a tool for ana...

Methods and steps to build nginx file server based on docker

1. Create a new configuration file docker_nginx.c...

【HTML element】Detailed explanation of tag text

1. Use basic text elements to mark up content Fir...

How to install and configure the Apache Web server

Learn how to host your own website on Apache, a r...

Summary of Common Terms in CSS (Cascading Style Sheet)

If you use CSS don't forget to write DOCTYPE, ...

Implementing access control and connection restriction based on Nginx

Preface Nginx 's built-in module supports lim...

Introduction to the use of select optgroup tag in html

Occasionally, I need to group select contents. In ...

Introduction to installing JDK under Linux, including uninstalling OpenJDK

1. View openjdk rpm -qa|grep jdk 2. Delete openjd...

Detailed explanation of how to select all child elements using CSS

How to recursively select all child elements usin...

Example code of Vue3 encapsulated magnifying glass component

Table of contents Component Infrastructure Purpos...

Vue+Bootstrap realizes a simple student management system

I used vue and bootstrap to make a relatively sim...

HTML uses canvas to implement bullet screen function

Introduction Recently, I needed to make a barrage...

Add a floating prompt for the header icon in the ElementUI table

This article mainly introduces how to add floatin...