elasticsearch的head插件和kibana的安装 windows环境

安装elasticsearch-rtf 5.1.1

参见我的博客:
https://blog.csdn.net/qq_41805981/article/details/100073173

1.head插件安装:

参考网址:
https://github.com/mobz/elasticsearch-head
有如下命令:
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
open http://localhost:9100/

其中:
git 命令需要下载 git (windows) 网址: https://gitforwindows.org/
npm命令需要下载 npm (windows)
npm命令下载比较慢 推荐继续下载一个叫做 cnpm
所有使用npm命令的语句都可以使用cnpm命令语句

如果报错误:
npminstall WARN package.json not exists: C:\Users\Administrator\package.json

解决:需要跳转到elacticsearch-head的目录中进行使用命令

浏览器访问:
http://localhost:9100
访问界面:
在未曾修改elasticsearch默认配置的情况下访问 http://localhost:9100
显示结果会和下面图中的界面有个地方不一样,那就是未连接elasticsearch。

在这里插入图片描述
由于elasticsearch在默认情况下不会允许第三方代理插件进行访问的,我们需要修改一下文件。
找到elasticsearch.yml文件:
elasticsearch ----》config–》elasticsearch.yml文件
在最后添加如下内容:
http.cors.enabled: true
http.cors.allow-origin: “*”
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE
http.cors.allow-headers: “X-Requested-with,Content-Type,Content-Length,X-User”

重新启动elasticsearch
如果启动报错如下:

Exception in thread “main” ElasticsearchParseException[malformed, expected settings to start with ‘o
bject’, instead was [VALUE_STRING]]

解决办法:
需要在elasticsearch.yml 文件修改的时候 在 : 后面加空格。
如:
xxx: xiaopang

这样就可以访问成功了。

2.安装 kibana 其实用的是里面的sense

[注]:这里使用kibana的版本号必须和elasticsearch版本号一致
这里
kibana 5.1.1
elasticsearch 5.1.1
下载网址:
https://www.elastic.co/cn/downloads/past-releases/kibana-5-1-1
下载完成:
在这里插入图片描述
直接解压到当前目录:

在这里插入图片描述
可以将G:\kibana-5.1.1-windows-x86\bin放入环境变量的path中去,启动。
或者跳到G:\kibana-5.1.1-windows-x86\bin目录下运行:

 kibana.bat

运行kibana参考图:在这里插入图片描述
kibana启动成功

在这里插入图片描述
浏览器中输入:
http://localhost:5601
访问成功:
在这里插入图片描述
可在命令行里进行操作。

完结

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值