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成功

相关推荐
.Ayang6 分钟前
【网络安全面经】技术性问题3
网络·windows·安全·web安全·网络安全·系统安全·安全架构
唐宋元明清218824 分钟前
网卡-国家码
网络·windows·网卡
小珑也要变强3 小时前
shell中的case语句和循环语句
linux·运维·windows
csdn5659738503 小时前
Elasticsearch 查看磁盘占用 查看指定索引磁盘占用
java·数据库·elasticsearch
洛阳泰山3 小时前
如何禁用关闭奇安信天擎开机自启动教程
windows·奇安信
( •̀∀•́ )9203 小时前
Windows安装Elasticsearch及Spring Boot整合ES教程
windows·spring boot·elasticsearch
P.H. Infinity3 小时前
【Elasticsearch】01-ES安装
大数据·elasticsearch·jenkins
abandondyy4 小时前
ELK Elasticsearch 集群部署
大数据·elk·elasticsearch
hong1616884 小时前
Elasticsearch:管理和排除 Elasticsearch 内存故障
大数据·elasticsearch·jenkins