插件head安装
安装node npm
nodejs 官网 https://nodejs.org/en/ 选择指定版本下载即可
安装 grunt
cnpm install -g grunt
cnpm install -g grunt-cli
下载head 源码
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
或者下载好后上传到服务器
解压
unzip elasticsearch-head-master.zip
下载依赖
cd path
cnpm install
es中 添加配置信息
# 增加新的参数,这样head插件可以访问es。设置参数的时候:后面要有空格
http.cors.enabled: true
http.cors.allow-origin: "*"
修改 head 配置信息
修改Head插件配置文件
vi Gruntfile.js
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
。。。。。。。
}
启动
grunt server
/
npm run start
网友评论