安裝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