• 【一】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
    • 2
    • 3
    • 4

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • ...\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
    
    • 1
    • 2
    • 把文件放在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: "*"
    
    • 1
    • 2

    在这里插入图片描述

    • 重启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

    在这里插入图片描述

    • 汉化文件路径

    在这里插入图片描述

    • 重启测试

    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述

  • 相关阅读:
    自然语言处理(NLP)-spacy简介以及安装指南(语言库zh_core_web_sm)
    扫地机器人遇冷?科沃斯、石头科技求变
    网络安全—黑客技术—自学笔记
    2022 (第五届)GIS软件技术大会开幕,GIS、IT将加速融合
    【golang】探索for-range遍历实现原理(slice、map、channel)
    http.header.Set()与Add()区别;
    阿里这份Java程序性能优化指南,让你的程序快上200%
    MyBatis-Plus(二、常用注解)
    SpringBoot-集成Kafka详解
    go sync.Map包装过的对象nil值的判断
  • 原文地址:https://blog.csdn.net/tu_wer/article/details/126864053