安装可视化界面Elasticsearch-head
将项目git到本地目录启动,就能看到如下界面
elasticsearch-head

但是它连接不上我们本地的ES,原因是跨域问题,我们需要进入ES的配置文件elasticsearch.yml,添加如下配置(*代表可以所有人访问),配置文件修改完成后要重启ES
http.cors.enabled: true #开启跨域支持
http.cors.allow-origin: "*" #允许所有人访问

配置好yml文件后再次访问就能正常连接了

安装kibana
Kibana可以将elasticsearch的数据通过友好的页面展示出来 ,提供实时分析的功能。
kibana官网下载地址
下载解压好后进入bin目录,点击.bat脚本启动,访问http://localhost:5601就能进入

但是页面是全英文的,我们可以将它换为中文模式
进入config的kibana.yml文件,将其中的en换为zh-CN,(配置文件中上面都有注释)


网友评论