Elasticsearch是一个基于Lucene的搜索引擎。适用于所有类型的数据,包括文本、数字、地理空间、结构化和非结构化数据。是一个分布式、RESTful 风格的搜索和数据分析引擎。
下载下载网址:https://www.elastic.co/cn/elasticsearch
了解目录-
bin:启动文件
-
config:配置文件
-
log4j2:日志配置文件
- jvm.options:java虚拟机相关配置
- elasticsearch.yml:elasticsearch的配置文件(默认端口:9200)
-
lib:相关jar包
-
logs:日志
-
modules:功能模块
-
plugins:插件(比如 ik 分词器)
启动 elasticsearch.bat,并访问 localhost:9200
解决跨域:
- 打开 elasticsearch.yml(添加以下代码)
http.cors.enabled: true //开启跨域支持 http.cors.allow-origin: "*" //允许所有访问
可视化插件 ES-head
下载地址:https://github.com/mobz/elasticsearch-head
- 下载相关依赖:
D:EnvironmentElasticSearchelasticsearch-head-master>cnpm install ......
- 启动:
D:EnvironmentElasticSearchelasticsearch-head-master>npm run start
- 访问 localhost:9100,若点击页面没有反应,因为我们是使用9100端口连接9200端口,因为跨端口而出现的问题。解决跨域问题的方法参考文章前面。
初始Kibana 下载安装
下载地址:https://www.elastic.co/cn/kibana/(注意要与es版本一致)
启动打开 kibana.bat
//启动失败可以尝试修改es的jvm选项,提升运行内存到2g访问测试
访问:localhost:5601,之后所有操作都在 Dev Tools 进行
汉化打开 kibana.yml,修改为:
# Specifies locale to be used for all localizable strings, dates and number formats. # Supported languages are the following: English - en , by default , Chinese - zh-CN . #i18n.locale: "en" i18n.locale: "zh-CN"
汉化yml在 D:EnvironmentElasticSearchkibana-7.6.1-windows-x86_64x-packpluginstranslationstranslations



