Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install elasticsearch and kibana in docker

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains how to install elasticsearch and kibana in docker. The content is clear. Interested friends can learn about it. I believe it will be helpful after reading it.

Elasticsearch is quite popular now, and many companies are using it, so if you don't know about es, it may be despised. So here I made up my mind to learn es, I prefer docker so I use docker to install es, here will describe the details of the installation and need to pay attention to. I'm not going to explain the installation of docker here, you can install it by yourself, it's very simple, I'm sure you may really fall in love with it. The computer I use here is MacBook Pro, if it is linux, it is basically the same, but if it is Windows, it may be different. I have not actually operated it here, and those who are interested can try it on their own.

1. Install elasticsearch

Pull elasticsearch Mirror

Docker pull elasticsearch

Create a handover mode network

Docker network create elasticsearch_net

Installation

Docker run-d-- name elasticsearch-p 9200 elasticsearch_volume:/root-p 9300 network elasticsearch_net-v elasticsearch_volume:/root-e "privileged=true"-e "discovery.type=single-node" elasticsearch#-d background operation #-- name elasticsearch container name #-p 9200 elasticsearch_volume:/root 9200-p 9300 elasticsearch_volume:/root 9300 mapped port #-network elasticsearch_net designated network #-v elasticsearch_volume:/root named shared directory #-e "privileged=true" configuration Set access permissions #-e "discovery.type=single-node" specify elasticsearch deployment mode # elasticsearch specified image-#-v elasticsearch_volume:/root named shared directory #-e "privileged=true" configuration access permissions initially without configuration access permissions Es can't get up all the time. You can get up if you add permission.

Modify configuration

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

Restart es

Docker restart elasticsearch

Install the ik word splitter

Download the same version of the ik participle zip package through a shared directory or direct wget, and link

Extract to / usr/share/elasticsearch/plugins directory

Restart es

You can see in the docker restart elasticsearch startup log that the plug-in is loaded into the ik splitter.

Install kibana

Docker pulls 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 name kibana 5601 kibana:5.6.12

Visit kibana

Install elasticsearch-head

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

After reading the above, do you have a further understanding of how docker installs elasticsearch and kibana? if you want to learn more, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report