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

windows环境下,安装elasticsearch

目录

  • 前言
  • 准备
    • 安装 jdk
  • 安装nodejs
    • ElasticSearch下载
    • ElasticSearch-head 下载
  • 安装ElasticSearch
  • 安装ElasticSearch-head插件
  • 设置用户名密码访问
  • 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: trueallow-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: trueallow-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]yPassword 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

http://www.lryc.cn/news/101462.html

相关文章:

  • Elasticsearch入门笔记(一)
  • 记一次安装nvm切换node.js版本实例详解
  • 生态共建丨YashanDB与构力科技完成兼容互认证
  • React从入门到实战-react脚手架,消息订阅与发布
  • 从零构建深度学习推理框架-1 简介和Tensor
  • 使用WGCLOUD监测安卓(Android)设备的运行状态
  • C++笔记之迭代器失效问题处理
  • Tomcat的startup.bat文件出现闪退问题
  • JAVA8-lambda表达式8:在设计模式-模板方法中的应用
  • React之组件间通信
  • 【MATLAB第58期】基于MATLAB的PCA-Kmeans、PCA-LVQ与BP神经网络分类预测模型对比
  • CF1833 A-E
  • 【深度学习】【Image Inpainting】Generative Image Inpainting with Contextual Attention
  • 二维深度卷积网络模型下的轴承故障诊断
  • redis突然变慢问题定位
  • React井字棋游戏官方示例
  • 七大经典比较排序算法
  • 【点云处理教程】03使用 Python 实现地面检测
  • Python 日志记录:6大日志记录库的比较
  • 最近遇到一些问题的解决方案
  • 封装hutool工具生成JWT token
  • 【手机】三星手机刷机解决SecSetupWizard已停止
  • GDAL C++ API 学习之路 OGRGeometry 抽象曲线基类 OGRCurve
  • etcd底层支持的数据库有哪些
  • linux设备驱动的poll与fasync
  • TortoiseGit安装与配置
  • Java代码打印空心菱形(小练习)
  • 【性能优化】MySQL百万数据深度分页优化思路分析
  • 交叉编译工具链的安装、配置、使用
  • 【C++ 进阶】继承