@1234567890
2017-05-22T13:38:23.000000Z
字数 650
阅读 1158
ES
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
grunt server
由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包,https://nodejs.org/en/download/
# set node environment
export NODE_HOME=/usr/elk/node-v6.9.1-linux-x64
export PATH=$PATH:$NODE_HOME/bin
cd elasticsearch-head
npm install
grunt server(如果没有grunt,执行npm install -g grunt-cli安装)
open http://localhost:9100/
注意 npm install
安装缓慢
npm install -g cnpm --registry=http://registry.npm.taobao.org
为了避免每次安装都需要--registry参数,可以使用如下命令进行永久设置:
npm config set registry http://registry.npm.taobao.org
//:后面要留空格
http.cors.enabled: true
http.cors.allow-origin: "*"