文章目录
windows版 elk部署文档
1、文件准备
官网下载地址: https://www.elastic.co/downloads/past-releases
下载文件:kibana、logstash、elasticsearch,版本号需要一致,示例如下:
https://www.elastic.co/cn/downloads/past-releases/kibana-8-15-1
https://www.elastic.co/cn/downloads/past-releases/logstash-8-15-1
https://www.elastic.co/cn/downloads/past-releases/elasticsearch-8-15-1
2、系统配置启动
以下以8.15.1版本讲解elasticsearch、kibana、logstash 系统的配置与启动
2.1、elasticsarch
2.1.1、生成证书
解压压缩包如下图
打开cmd切换到bin目录下,执行
elasticsearch-certutil.bat ca
第一个断点处按下回车键
第二个断点处输入密码,(记录密码,生成秘钥需要用到)
完成后会生成一个文件:elastic-stack-ca.p12
2.1.2、生成秘钥
同理在cmd bin 目录下执行语句
elasticsearch-certutil.bat cert --ca ./elastic-stack-ca.p12
第一个断点处输入密码
第二个断点处直接回车
第三个断点处再次确认密码后回车,后生成一个文件:elastic-certificates.p12
2.1.3、移动凭证
在config文件夹下新建certificates 文件夹,将生成的elastic-stack-ca.p12
和elastic-certificates.p12
文件都移动到certificates文件夹内如下图所示
2.1.4、改配置
修改config/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: my-elatics
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# 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: D:\elk\elasticsearch-8.15.1\data
#
# Path to log files:
#
path.logs: D:\elk\elasticsearch-8.15.1\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.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 0.0.0.0
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["127.0.0.1"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 18-09-2024 07:28:42
标签:node,elk,Java,elastic,windows,kibana,elasticsearch,2.1
From: https://blog.csdn.net/captorwz/article/details/142461530