elasticseach 安装head

安装NodeJS

wget https://npm.taobao.org/mirrors/node/latest-boron/node-v6.10.0-linux-x64.tar.gz

解压,,配置环境变量

 

安装npm

npm install -g cnpm --registry=https://registry.npm.taobao.org

 

 

使用npm安装grunt

npm install -g grunt

 

npm install -g grunt-cli --registry=https://registry.npm.taobao.org --no-proxy

 

 

下载head插件源码

wget https://github.com/mobz/elasticsearch-head/archive/master.zip

 

unzip master.zip

 

进入elasticsearch-head-master目录,执行下面命令

 

npm install

 

配置 ElasticSearch

vim config/elasticsearch.yml

# 增加新的参数,这样head插件可以访问es。设置参数的时候:后面要有空格

http.cors.enabled: true

http.cors.allow-origin: "*"

 

修改Head插件配置文件

 

vim Gruntfile.js

connect: {
                        server: {
                                options: {
                                        hostname: '0.0.0.0',
                                        port: 9100,
                                        base: '.',
                                        keepalive: true
                                }
                        }
                }

 

 

 

启动 head        grunt server

 

浏览器访问 9100

posted @ 2018-01-11 14:22  袁宝东  阅读(139)  评论(0编辑  收藏  举报