Install ElasticSearch plugin for head

git clone git://github.com/mobz/elasticsearch-head.git
yum install git npm 
cd elasticsearch-head  

npm install -g grunt --registry=https://registry.npm.taobao.org
npm config set strict-ssl false
npm install

修改配置 elasticsearch-head下Gruntfile.js文件 -> 修改connect配置节点
hostname: "your_ip",  -- ADD
prot: 9100,

修改 _site/app.js 修改http://localhost:9200字段到本机ES端口与IP
|| "http://your_ip:9200" -- modify

修改 elasticsearch配置文件 
修改elasticsearch.yml文件加入以下内容:
# 是否支持跨域
http.cors.enabled: true
# *表示支持所有域名
http.cors.allow-origin: "*"

重启ElasticSearch

nohup sh ./node_modules/grunt/bin/grunt server >> logs/head_log 2>&1 &
原文地址:https://www.cnblogs.com/chenzechao/p/10143753.html