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 ELK using docker

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

Share

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

This article mainly introduces how to use docker to install ELK, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Environment

Virtual machine software VmWare15.5 Centos7.0

Install docker

Yum install docker

After successful installation, use docker-- version

Prerequisites for installing ELK (real machine)

1.Docker has to allocate at least 3GB memory

2.Elasticsearch requires at least 2 gigabytes of memory

3. Firewall opens relevant ports

If the configuration is too poor, you can specify the configuration parameters to use

Vm.max_map_count needs at least 262144

Download the image

Start docker first

Systemctl start docker

Drop-down mirror image

Docker pull sebp/elk

Waiting for all downloads to complete, it may take a long time and you need to wait patiently.

Change Ali source

If you find that one download is not successful, change Ali's source.

Login URL: https://cr.console.aliyun.com/

Configure this address in the virtual machine:

Vim / etc/docker/daemon.json

{

"registry-mirrors": ["https://xxxxx.mirror.aliyuncs.com"]"

}

Restart docker

Sudo systemctl daemon-reload

Sudo systemctl restart docker

Running

Docker run-p 5601 ES_MAX_MEM=1024m 5601-p 9200 ES_MAX_MEM=1024m 9200-p 5044 it-- name elk sebp/elk

To ensure normal operation, specify the minimum and maximum memory.

Max_map_count problem and its solution

Vi / etc/sysctl.conf

Add the following code

Vm.max_map_count=262144

Ps:

After editing the configuration file: sysctl-p (this command must be added, otherwise it will not work)

You may also see that future versions require java11 support, which does not affect usage here.

Rerun the startup code that indicates that the name already exists

Solution: view all containers and delete the previous container id

Docker ps-a

Delete: docker rm Container ID

Rerun the command

Docker run-p 5601 ES_MAX_MEM=1024m 5601-p 9200 ES_MAX_MEM=1024m 9200-p 5044 it-- name elk sebp/elk

Browser access: http://ip:5601

The following interface will be correct.

View version

Generally using docker to install a relatively new version, for the test phase, the impact is not significant.

Thank you for reading this article carefully. I hope the article "how to use docker to install ELK" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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