版本说明
Python 2.7.5
pip 20.3.4
Docker version 24.0.2, build cb74dfc
1. 镜像下载
# es镜像
docker pull elasticsearch:7.17.10
# kibana镜像
docker pull kibana:7.17.10
2. 创建数据挂载的目录
# kibana数据挂载的目录
mkdir /home/es/kibana
# 三个节点数据挂载的目录
mkdir /home/es/node1
mkdir /home/es/node2
mkdir /home/es/node3
3. 修改 kibana 配置文件
接下来进入 /home/es/kibana 目录,新建 kibana.yml,添加以下内容
#
## ** THIS IS AN AUTO-GENERATED FILE **
##
#
# # Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://es01:9200","http://es02:9200","http://es03:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: zh-CN
4. 修改ES配置文件
进入 node1,同样新建配置文件 elasticsearch.yml
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: es-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: es01
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#