当前位置: 首页 > article >正文

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/,界面如下:


http://www.kler.cn/a/454700.html

相关文章:

  • 上门回收小程序如何搭建?有个小程序收破烂也要高端?
  • ChatGPT 在临床药学中的有效性以及人工智能在药物治疗管理中的作用
  • Ubuntu 中安装 RabbitMQ 教程
  • 小程序租赁系统的优势与未来发展潜力分析
  • 【mybatis】通过XML的方式拼接动态sql
  • 智能流程管理:CRM系统助力订单与回款自动化
  • React 高级组件开发:动态逻辑与性能优化
  • TCP-UDP调试工具推荐:Socket通信测试教程(附详细图解)
  • 数据库基础知识---以MySQL为例
  • 设计模式详解(建造者模式)
  • VSCode使用deepseek-v3
  • HarmonyOS NEXT 实战之元服务:静态案例效果---我的生活记录
  • R语言森林生态系统结构、功能与稳定性分析与可视化
  • 大模型-ChatGLM-6B模型部署与微调记录
  • 如何突破迷茫,提升 Java 开发技术能力
  • NVR小程序接入平台EasyNVR视频监控技术如何助力餐饮行业实现明厨亮灶
  • 在 Spring Boot 的 MVC 框架中 路径匹配的实现 详解
  • [python学习笔记]--异常、with、assert
  • 接口Mock技术介绍
  • Exchange ProxyShell 攻击链利用详解