以
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
- 下载地址: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、下载
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"
- 汉化文件路径
- 重启测试
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/70382.html