美文网首页
elasticsearch5.0.x学习三-head

elasticsearch5.0.x学习三-head

作者: 不知冷暖_野孩子 | 来源:发表于2016-11-30 23:58 被阅读92次

对于elasticsearch5.x ————site plugins are not supported. Run elasticsearch-head as a standalone server

就是说不支持直接安装head插件,需要启动一个服务

git clone https://github.com/mobz/elasticsearch-head.git

移动目录

mv elasticsearch-head /usr/elkb/head

chmod 777 /usr/elkb/head

安装node

https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.xz

xz -d node-v6.9.1-linux-x64.tar.xz

tar -xvf node-v6.9.1-linux-x64.tar

mv node-v6.9.1-linux-x64 /usr/node

设置环境变量gedit /etc/bash.bashrc

export NODE_HOME=/usr/node

export PATH=$PATH:$NODE_HOME/bin

source /etc/profile

node -v

安装grunt

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

修改head源码head/Gruntfile.js

connect: {

             server: {

                          options: {

                                           port: 9100,

                                           hostname: '*',      //增加这一条

                                           base: '.',

                                           keepalive: true

}

}

}

head的连接地址设置:head/_site/app.js

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";

在head目录下npm install --registry=https://registry.npm.taobao.org

碰到phantomjs包下不下来,先下好包然后放到tmp/phantomjs下

chmod 777 phantomjs

启动head

grunt server

最后设置一下elasticsearch.yml让head访问到es

http.cors.enabled: true

http.cors.allow-origin: "*"

小心空格报错http://www.jianshu.com/p/b25d00305d7a

相关文章

网友评论

      本文标题:elasticsearch5.0.x学习三-head

      本文链接:https://www.haomeiwen.com/subject/atmzpttx.html