Windows安装 Elasticsearch 教程

下载地址

Past Releases of Elastic Stack Software | Elastic

Windows安装 Elasticsearch 教程_第1张图片

 Windows安装 Elasticsearch 教程_第2张图片

 解压

Windows安装 Elasticsearch 教程_第3张图片

 解压完的样子

Windows安装 Elasticsearch 教程_第4张图片

 进入BIN目录

D:\Develop\elasticsearch\elasticsearch-7.12.0\bin

按住shift +鼠标右键 打开 powershell 窗口

Windows安装 Elasticsearch 教程_第5张图片

 查看ES版本

 .\elasticsearch.bat --version

出现问题了

警告:不赞成使用JAVA_HOME,请使用ES_JAVA_HOME

Windows安装 Elasticsearch 教程_第6张图片

PS D:\Develop\elasticsearch\elasticsearch-7.12.0\bin> .\elasticsearch.bat --version
"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
Future versions of Elasticsearch will require Java 11; your Java version from [C:\Program Files\Java\jdk1.8.0_241\jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Warning: with JDK 8 on Windows, Elasticsearch may be unable to derive correct
  ergonomic settings due to a JDK issue (JDK-8074459). Please use a newer
  version of Java.
Warning: MaxDirectMemorySize may have been miscalculated due to JDK-8074459.
  Please use a newer version of Java or set MaxDirectMemorySize explicitly.
Version: 7.12.0, Build: default/zip/78722783c38caa25a70982b5b042074cde5d3b3a/2021-03-18T06:17:15.410153305Z, JVM: 1.8.0_241

新增一个 ES_JAVA_HOME

Windows安装 Elasticsearch 教程_第7张图片

 再次执行 .\elasticsearch.bat --version

Windows安装 Elasticsearch 教程_第8张图片

PS D:\Develop\elasticsearch\elasticsearch-7.12.0\bin> .\elasticsearch.bat --version
Future versions of Elasticsearch will require Java 11; your Java version from [C:\Program Files\Java\jdk1.8.0_241\jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Warning: with JDK 8 on Windows, Elasticsearch may be unable to derive correct
  ergonomic settings due to a JDK issue (JDK-8074459). Please use a newer
  version of Java.
Warning: MaxDirectMemorySize may have been miscalculated due to JDK-8074459.
  Please use a newer version of Java or set MaxDirectMemorySize explicitly.
Version: 7.12.0, Build: default/zip/78722783c38caa25a70982b5b042074cde5d3b3a/2021-03-18T06:17:15.410153305Z, JVM: 1.8.0_241

不报错了。

启动ES

 .\elasticsearch.bat

提示[2023-08-17T14:30:12,880][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [DESKTOP-QT6GKBM] Active license is now [BASIC]; Security is disabled

活动许可证现在为[BASIC];安全性已禁用

就卡在这里了,哎。

检查是否成功启动

在浏览器中输入:http://localhost:9200/?pretty

Windows安装 Elasticsearch 教程_第9张图片

 

出现这样的结果。Elasticsearch 现在已设置并正在运行,但是没有密码保护。 Elastic Stack 免费提供基于角色的访问控制(RBAC)。

先用用试试,在修改他的安全性吧。

你可能感兴趣的:(elasticsearch,搜索引擎)