安装es-head前提要安装好 node.js和git
node -v, npm -v,git --version 这三个命令都有版本返回就ok
下载命令:
git clone https://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head/
进入下载目录
安装 npm install
配置elasticsearch,允许head插件远程访问:
在 安装目录/config/elasticearch.yml 文件末尾 添加:
http.cors.enabled: true http.cors.allow-origin: "*"
启动elasticsearch-head服务:
es-head安装目录下执行
npm run start (es-head默认是9100端口,和gitlab的node_exporter端口冲突)
浏览器输入: http://localhost:9100