ES elasticsearch-8.17.0-windows-x86_64使用

1、下载ES(elasticsearch 简称 ES 下载链接:https://www.elastic.co/downloads/elasticsearch)

ES 下载链接:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.17.0-windows-x86_64.zip)),需要在修改ES配置,进入ES解压以后的文件下的config目录,找到elasticsearch.yml,打开后修改自己需要的配置

elasticsearch.yml配置如下,记事本打开保存时注意需要utf-8保存。

复制代码
cluster.name: linjie
node.name: lj_node_1
network.host: 0.0.0.0
http.port: 9200
transport.port: 9300
#node.master: true
#node.data: true
#discovery.zen.ping.unicast.hosts: ["0.0.0.0:9300", "0.0.0.0:9301"]
#discovery.zen.minimum_master_nodes: 1
#node.ingest: true
bootstrap.memory_lock: false
#node.max_local_storage_nodes: 2

path.data: D:\Temp\1\elasticsearch-8.17.0-windows-x86_64\data
path.logs: D:\Temp\1\elasticsearch-8.17.0-windows-x86_64\logs

http.cors.enabled: true
http.cors.allow-origin: /.*/
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["lj_node_1"]

2、安装时遇到的问题:

浏览器无法访问127.0.0.1:9200

127.0.0.1:9200无法访问:elasticsearch8.3安装配置(window)_elasticsearch-8.13.2 windows-CSDN博客

访问后可能提示 localhost 未发送任何数据。 ERR_EMPTY_RESPONSE

查看控制台报错:

received plaintext htp traffic on an https channel, closing connection Netty4HttpChannel

此报错原因在于是因为开启了 ssl 认证。解决

查看configelasticsearch.yml

启动后增添了一些默认配置信息,需要将xpack.security.enabled,xpack.security.enrollment.enabled 修改为false,关闭ssl认证

用户密码未知的问题

Elasticsearch8 安装完成后,用 elasticsearch-head连接,提示需要用户名密码。

Elasticsearch8默认用户名为elastic, 密码可以使用以下命令进行重置(bin目录下)cmd输入:elasticsearch-reset-password -u elastic ,再选择y,然后密码会显示出来。

如:elastic,PE2BS78Sut28xUBrLIS1

在网址里面输入:https://127.0.0.1:9200/,界面如下:

相关推荐
pride.li3 小时前
Git 笔记:将一段旧历史压缩成一个提交
大数据·elasticsearch·搜索引擎
dyxal4 小时前
内网 Windows 离线安装 uv:极速 Python 包管理器的部署实战
windows·python·uv
stone08234 小时前
如何解决Windows硬盘变成了空白
windows
零号全栈寒江独钓5 小时前
基于c/c++实现linux/windows跨平台ntp时间戳服务器
linux·c语言·c++·windows
萌>__<新5 小时前
Git常见使用命令及易踩坑点
大数据·elasticsearch·搜索引擎
舒一笑5 小时前
Windows 下执行 pnpm install 报 EBUSY: resource busy or locked,我最后用这一招解决了
前端·windows·程序员
hERS EOUS6 小时前
Redis 下载与安装 教程 windows版
数据库·windows·redis
爱吃香蕉的阿豪7 小时前
Mac 远程操作 Windows 开发:ZeroTier + JetBrains 实战指南
windows·macos·zerotoer
YJlio8 小时前
2026年4月18日60秒读懂世界:从神舟二十号出舱到L2新国标公示,今天最值得关注的6个信号
windows·python·django·计算机外设·电脑·outlook·eixv3
代码小书生16 小时前
Windows X-Lite Win11 26H1 v3 游戏优化系统!集Win11、Win10、Win7三代优点,兼顾游戏办公生产算力,系统精简纯净!
windows·win10·电脑系统·windows10·26h1·windows x-lite·操作系统操作系统