windows环境下,安装elasticsearch

目录

前言

  • win10
  • elasticsearch 8.9.0

准备

安装 jdk

ElasticSearch 是基于lucence开发的,也就是运行需要java jdk支持。

ElasticSearch 8.9.0 自带 OpenJDK ,无需再安装jdk。

安装nodejs

在Windows系统安装Nodejs

ElasticSearch下载

下载安装包:https://www.elastic.co/downloads/elasticsearch

ElasticSearch-head 下载

下载源码:https://github.com/mobz/elasticsearch-head

安装ElasticSearch

  1. 下载安装包后解压
  1. 修改 ES/config/elasticsearch.yml 文件

    复制代码
    xpack.security.enabled: false
    xpack.security.http.ssl.enabled: false
    http.cors:
      enabled: true
      allow-origin: "*"
  2. 进入bin目录下,双击执行elasticsearch.bat

  1. 看到started说明启动成功,打开浏览器测试一下,如下图

http://localhost:9200

安装ElasticSearch-head插件

  1. 解压源码
  2. 进入 elasticsearch-head 目录,执行命令:npm install (如果报错,尝试:npm install phantomjs-prebuilt@2.1.16 --ignore-scripts
  3. 启动:npm run start
  4. 打开: http://localhost:9100/

设置用户名密码访问

  1. 修改 ES/config/elasticsearch.yml 文件

    复制代码
    xpack.security.enabled: true
    http.cors:
      enabled: true
      allow-origin: "*"
      allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
  2. 重启elasticsearch

  3. elasticsearch 8.9.0 默认情况下,elastic 的用户已存在且已设置了密码,需要执行命令重置密码:

    复制代码
    cmd> elasticsearch-reset-password.bat -u elastic
    warning: ignoring JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144; using bundled JDK
    This tool will reset the password of the [elastic] user to an autogenerated value.
    The password will be printed in the console.
    Please confirm that you would like to continue [y/N]y
    
    
    Password for the [elastic] user successfully reset.
    New value: qh1rG*****************
  4. 打开: http://localhost:9200

  5. 打开ElasticSearch-head : http://localhost:9100/?auth_user=elastic&auth_password=changeme

ElasticSearch 默认用户名和密码

复制代码
user: elastic 
password: changeme 

参考

https://www.cnblogs.com/hualess/p/11540477.html

https://blog.csdn.net/shen198623/article/details/123045793

https://blog.csdn.net/fenghuibian/article/details/86585344

https://blog.csdn.net/qq_35349114/article/details/100096115

https://huaweicloud.csdn.net/637ef507df016f70ae4ca581.html

相关推荐
历程里程碑12 小时前
链表--LRU缓存
大数据·数据结构·elasticsearch·链表·搜索引擎·缓存
尽兴-13 小时前
Elasticsearch 入门全景:核心概念与典型应用场景速览
大数据·elasticsearch·搜索引擎·全文检索·高性能·elastic stack·分布式生态
php_kevlin13 小时前
git提交限制规范
大数据·git·elasticsearch
尽兴-14 小时前
Elasticsearch 8.14.3 安装部署实战:Windows/Linux + Kibana + 常用插件
linux·windows·elasticsearch·kinana·es 浏览器插件
凸头14 小时前
后过滤召回塌陷:Redis 先召回 → ES 再过滤,如果全部被过滤掉怎么办?
数据库·redis·elasticsearch
Elastic 中国社区官方博客14 小时前
使用 Elasticsearch Inference API 结合 Hugging Face 模型
大数据·人工智能·elasticsearch·搜索引擎·ai·全文检索
凸头15 小时前
四种向量检索架构对比:RedisSearch、ES 与混合架构选型分析
大数据·elasticsearch·架构
margu_1682 天前
【Elasticsearch】es7.2 跨集群迁移大量数据方法二
elasticsearch
恼书:-(空寄2 天前
深入理解 Elasticsearch 写入与查询机制
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客2 天前
快速 vs. 准确:衡量量化向量搜索的召回率
大数据·人工智能·elasticsearch·搜索引擎·ai·全文检索