Windows系统 ElasticSearch,分词器、Kibana安装

目录

1.wins安装ElasticSearch

1.下载es安装包

https://www.elastic.co/cn/downloads/elasticsearch

2.下载分词器

https://github.com/medcl/elasticsearch-analysis-ik/releases

3.注意事项

java 复制代码
1.安装版本
Elasticsearch、分词器、kibana版本三者保持一致
2.安装和启动顺序
先安装es,再安装分词器、再安装kibana
3.界面连接
Elasticsearch可视化界面
https://localhost:9200
kibana可视化界面
http://localhost:5601
4.启动es时要记住账户、密码、和kibana连接es的令牌
5.分词器可以先启动成功es再安装分词器重启es

4.学会看报错日志

如果安装过程出现cmd命令行闪退,需要看错误日志

下载es

2.将 elasticsearch 以服务的方式安装

安装ES解压到根盘符下,如C或E盘等,因为 E:\Program Files文件夹下的都是默认的只读权限,所以换到没有只读权限,否则安装分词器插件会报错,导致es启动失败

配置中文乱码问题

-Dfile.encoding=GBK

Elasticsearch_Server

在插件plugins文件夹安装分词器


如果es不安装在根盘符下,会导致报错,分析为配置文件IKAnalyzer.cfg.xml只有可读权限,所以一定要在盘符下安装es

java 复制代码
[2024-11-18T09:42:01,997][INFO ][o.w.a.d.Dictionary       ] [DESKTOP-SAE4P2Q] try load config from E:\Program Files\elasticsearch-8.12.2\config\analysis-ik\IKAnalyzer.cfg.xml
[2024-11-18T09:42:01,998][INFO ][o.w.a.d.Dictionary       ] [DESKTOP-SAE4P2Q] try load config from E:\Program%20Files\elasticsearch-8.12.2\plugins\analysis-ik\config\IKAnalyzer.cfg.xml
[2024-11-18T09:42:01,998][WARN ][o.e.i.c.IndicesClusterStateService] [DESKTOP-SAE4P2Q] [.security-profile-8][0] marking and sending shard failed due to [failed to create index]
java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\Program%20Files\elasticsearch-8.12.2\plugins\analysis-ik\config\IKAnalyzer.cfg.xml" "read")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:488) ~[?:?]
	at java.security.AccessController.checkPermission(AccessController.java:1071) ~[?:?]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:411) ~[?:?]
	at java.lang.SecurityManager.checkRead(SecurityManager.java:742) ~[?:?]
	at java.io.FileInputStream.<init>(FileInputStream.java:141) ~[?:?]
	at org.wltea.analyzer.dic.Dictionary.<init>(Dictionary.java:118) ~[?:?]
	at org.wltea.analyzer.dic.Dictionary.initial(Dictionary.java:150) ~[?:?]
	at org.wltea.analyzer.cfg.Configuration.<init>(Configuration.java:40) ~[?:?]
	at org.elasticsearch.index.analysis.IkTokenizerFactory.<init>(IkTokenizerFactory.java:15) ~[?:?]
	at org.elasticsearch.index.analysis.IkTokenizerFactory.getIkSmartTokenizerFactory(IkTokenizerFactory.java:23) ~[?:?]
	at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:519) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenizerFactories(AnalysisRegistry.java:327) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:209) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:511) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:754) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:646) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:185) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndicesAndUpdateShards(IndicesClusterStateService.java:494) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:252) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:539) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:525) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:498) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:429) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:154) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:916) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:217) ~[elasticsearch-8.12.2.jar:?]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:183) ~[elasticsearch-8.12.2.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]

3. 在系统环境变量 Path 中添加如下路径

4.启动点击即可

elasticsearch.bat

5.双击 elasticsearch.bat 启动 elasticsearch 服务

6.启动后第一次会显示一些配置信息,包括默认的用户密码 先记住 记不住的话可以重置密码

7.验证安装结果 启动成功

在浏览器中输入如下链接和用户名密码

https://localhost:9200/

版本 8.16.0

8.安装 ElasticSearch-head 插件

9.安装 kibana

1.下载与Elasticsearch 相同版本的 kibana

https://www.elastic.co/cn/downloads/past-releases#kibana


10.启动 Kibana服务

bin目录下双击执行 kibana.bat 文件, 启动 kibana

访问 http://localhost:5601

11.配置Kibana连接ElasticSearch令牌enrollment token

12.生成令牌

elasticsearch-create-enrollment-token -s kibana --url "https://127.0.0.1:9200"

13.复制粘贴令牌

14.点击配置Elastic启动下图生成校验码



15.kibana可视化界面连接Elasticsearch成功

相关推荐
慕羽★4 小时前
详细介绍如何使用rapidjson读取json文件
linux·c++·windows·json·file·param·rapidjson
sukalot5 小时前
windows C#-命名实参和可选实参(下)
windows·c#
Y编程小白9 小时前
Git版本控制工具--基础命令和分支管理
大数据·git·elasticsearch
只抄10 小时前
Windows “高性能”模式既不高效,也不节能?
windows
字母数字或汉字15 小时前
了解与配置 Git autocrlf 文本换行符处理
windows·git
酱学编程16 小时前
ES搜索原理
大数据·elasticsearch·搜索引擎
树懒_Zz16 小时前
记录 io.springfox 3.0.0 整合 spring boot 2.6.x 由于 springfox bug 引发问题
windows·spring boot·bug
龙少954317 小时前
【SpringBoot中怎么使用ElasticSearch】
spring boot·elasticsearch·jenkins
liupenglove17 小时前
Kibana8.17.0在mac上的安装
elasticsearch·macos·kibana
花花鱼17 小时前
VSCode中鼠标指针消失的原因及解决方法
ide·windows·vscode·编辑器