以
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
解压至目标文件夹
...\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
经过以上配置后,在初次启动时,遇到了闪退的情况,没有异常信息。后来重启后正常了。
该方式没有成功;可能跟系统安全权限有关;
es.vbs
set ws=WScript.CreateObject("WScript.Shell")
ws.Run "D:\program\environment\es\elasticsearch-8.1.0\bin\elasticsearch.bat /start",0
该bat脚本文件是官方提供;在cmd下
install
即可;简单方便。推荐!!!
ES 的可视化管理界面
elasticsearch-head
在
cmd
命令下进入elasticsearch-head-5.0.0
目录,执行cnpm install
,前提是系统要有node.js
环境
npm run start
;在 HEAD 安装目录下进入 cmd
窗口执行在ES的
elasticsearch.yml
中添加如下配置项:
http.cors.enabled: true
http.cors.allow-origin: "*"
官方介绍: Kibana 是一个免费且开放的用户界面,能够让您对 Elasticsearch 数据进行可视化,并让您在 Elastic Stack 中进行导航。您可以进行各种操作,从跟踪查询负载,到理解请求如何流经您的整个应用,都能轻松完成。
下载对应的版本
8.1.0
默认访问路径:
http://localhost:5601/
只需修改
kibana.yml
配置即可;官方提供了中文配置文件zh-CN.json
i18n.locale: "zh-CN"