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

相关推荐
helloliyh1 小时前
Windows和Linux系统安装东方通
linux·运维·windows
m0_748245743 小时前
基于windows的mysql5.7安装配置教程
windows
秋风&萧瑟3 小时前
【数据结构】顺序队列与链式队列
linux·数据结构·windows
超级阿飞4 小时前
利用Kubespray安装生产环境的k8s集群-实施篇
elasticsearch·容器·kubernetes
代码讲故事7 小时前
从Windows通过XRDP远程访问和控制银河麒麟ukey v10服务器,以及多次连接后黑屏的问题
linux·运维·服务器·windows·远程连接·远程桌面·xrdp
qdprobot12 小时前
Mixly米思齐1.0 2.0 3.0 软件windows版本MAC苹果电脑系统安装使用常见问题与解决
windows·macos
雪靡14 小时前
正确获得Windows版本的姿势
c++·windows
小诺大人14 小时前
Docker 安装 elk(elasticsearch、logstash、kibana)、ES安装ik分词器
elk·elasticsearch·docker
chengxuyuan6666615 小时前
python基础语句整理
java·windows·python
forestsea18 小时前
【Elasticsearch 】 聚合分析:桶聚合
大数据·elasticsearch·搜索引擎