ealsticsearch只是后端提供各种api,可以添加索引查看数据等,但需要在命令行操作,elasticsearch-head是一个基于node.js的前端工程,可以提供WEB方式的信息查看和各种API的视图化操作。
1.nodejs安装
wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-x64.tar.xz
tar xf node-v10.9.0-linux-x64.tar.xz
echo 'PATH=$PATH:/usr/local/node-v10.9.0-linux-x64/bin' >> /etc/profile
source /etc/profile
2.phantomjs安装配置
Wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
yum -y install bzip2
tar –jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2
echo 'export PATH=$PATH:/usr/local/phantomjs-2.1.1-linux-x86_64/bin' >> /etc/profile
source /etc/profile
3.elasticsearch-head安装
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
4.启动
npm run start
open http://localhost:9100/
5.elasticsearch-head发现主机 并连接
修改elasticsearch.yml并重启
http.cors.enabled: true
http.cors.allow-origin: "*"
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。