【一】win10 下 ElasticSearch8.1.0、Head插件、Kibana下载与安装(图文详解)

win10 下安装 8.1.0 版本为例

jdk版本:openjdk 17

D:\> java -version
openjdk version "17" 2021-09-14
OpenJDK Runtime Environment (build 17+35-2724)
OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

1、ElasticSearch8.1.0 下载与安装

1.1、下载ElasticSearch8.1.0

在这里插入图片描述

在这里插入图片描述

1.2、解压

解压至目标文件夹

在这里插入图片描述

1.3、配置

1.3.1、系统环境变量

在这里插入图片描述

在这里插入图片描述

1.3.2、ES参数

  • ...\elasticsearch-8.1.0\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-application
cluster.name: es-tuwer

#
# ------------------------------------ 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: /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.
#
# 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: 192.168.0.1

#修改一下ES的监听地址,这样别的机器也可以访问
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: ["node-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 Elasticsea
  • ...\elasticsearch-8.1.0\config\jvm.options

在这里插入图片描述

经过以上配置后,在初次启动时,遇到了闪退的情况,没有异常信息。后来重启后正常了。

在这里插入图片描述

  • 正常启动

在这里插入图片描述

在这里插入图片描述

  • 访问测试

在这里插入图片描述

1.4 开机自启动

1.4.1 es.vbs

该方式没有成功;可能跟系统安全权限有关;

  • 编辑启动脚本文件 es.vbs
set ws=WScript.CreateObject("WScript.Shell")
ws.Run "D:\program\environment\es\elasticsearch-8.1.0\bin\elasticsearch.bat /start",0
  • 把文件放在win的启动目录下;需要有管理员权限

在这里插入图片描述

1.4.2 elasticsearch-service.bat

该bat脚本文件是官方提供;在cmd下 install 即可;简单方便。推荐!!!

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

2、Head插件安装

ES 的可视化管理界面 elasticsearch-head

在这里插入图片描述

2.1、下载

下载地址:Releases · mobz/elasticsearch-head · GitHub

在这里插入图片描述

在这里插入图片描述

2.2、解压至ES同级目录

在这里插入图片描述

2.3、安装依赖

cmd 命令下进入 elasticsearch-head-5.0.0 目录,执行 cnpm install ,前提是系统要有 node.js 环境

在这里插入图片描述
在这里插入图片描述

2.4、启动测试

  • 启动:npm run start;在 HEAD 安装目录下进入 cmd 窗口执行

在这里插入图片描述

在这里插入图片描述

  • 修改ES配置,解决跨域问题

在ES的 elasticsearch.yml 中添加如下配置项:

http.cors.enabled: true
http.cors.allow-origin: "*"

在这里插入图片描述

  • 重启ES测试,一切正常

在这里插入图片描述

3、Kibana 安装

官方介绍: Kibana 是一个免费且开放的用户界面,能够让您对 Elasticsearch 数据进行可视化,并让您在 Elastic Stack 中进行导航。您可以进行各种操作,从跟踪查询负载,到理解请求如何流经您的整个应用,都能轻松完成。

在这里插入图片描述

3.1、下载

下载对应的版本 8.1.0

在这里插入图片描述
在这里插入图片描述

3.2、解压至ES同级目录

在这里插入图片描述
在这里插入图片描述

3.3、启动

默认访问路径:http://localhost:5601/

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

3.4、汉化

只需修改 kibana.yml 配置即可;官方提供了中文配置文件 zh-CN.json

i18n.locale: "zh-CN"

在这里插入图片描述

  • 汉化文件路径

在这里插入图片描述

  • 重启测试

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

土味儿~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值