下载地址
Past Releases of Elastic Stack Software | Elastic
解压
解压完的样子
进入BIN目录
D:\Develop\elasticsearch\elasticsearch-7.12.0\bin
按住shift +鼠标右键 打开 powershell 窗口
查看ES版本
.\elasticsearch.bat --version
出现问题了
警告:不赞成使用JAVA_HOME,请使用ES_JAVA_HOME
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
再次执行 .\elasticsearch.bat --version
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
出现这样的结果。Elasticsearch 现在已设置并正在运行,但是没有密码保护。 Elastic Stack 免费提供基于角色的访问控制(RBAC)。文章来源:https://www.toymoban.com/news/detail-705348.html
先用用试试,在修改他的安全性吧。文章来源地址https://www.toymoban.com/news/detail-705348.html
到了这里,关于【ES】Windows安装 Elasticsearch 教程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!