首先安装elasticearch head插件,经过plugin命令安装时报错:git
提示找不到插件,后来经过github(https://github.com/mobz/elasticsearch-head)上的文档才知道5.x版本之后不支持这钟方式安装head插件,须要从github上clone代码安装,单独启动一个服务来运行。github
因而按照说明经过npm install 来安装,结果又碰到个问题:npm
经过网上搜索了解是license配置问题,修改package.json,把license改成:"license": "Apache-2.0"便可。json
可是打开http://localhost:9100/页面没法链接到elastic-search,后来发现elastic-search缺乏配置,因而加上了下面几项配置:cors
http.enabled: true
http.cors.enabled: true
http.cors.allow-origin: "*"elasticsearch
终于能够链接上了,出现了使人喜悦的绿色条。插件
elastic-search配置完后开始配置kibana,kibana比较简单,下载后能够直接启动。日志
最后启动logstash,索引
注:启动参数里面不能有中划线。文档
在kibana管理页面配置elastic-search索引就能够搜索日志了。