标签:res 查询 快速 安装插件 结果 重复 blog sha 操作
es-head主要有三个方面的操作:
官方的文档:
https://github.com/mobz/elasticsearch-head
1、Elasticsearch6.0安装插件,这个和低版本安装不一样.需要先安装nodejs
1)、下载npm包
官网下载npm安装包,https://nodejs.org/en/
[root@es-jypay-1 elasticsearch-head]# wget https://nodejs.org/dist/v8.9.1/node-v8.9.1-linux-x64.tar.xz
2)、解压,创建链接
[root@es-jypay-1 elasticsearch-head]#tar xf node-v8.9.1-linux-x64.tar.xz
[root@es-jypay-1 elasticsearch-head]#mv node-v8.9.1-linux-x64 /usr/local
[root@es-jypay-1 elasticsearch-head]#ln -s /usr/local/node-v8.9.1-linux-x64/bin/node /usr/local/bin/node
[root@es-jypay-1 elasticsearch-head]#ln -s /usr/local/node-v8.9.1-linux-x64/bin/npm /usr/local/bin/npm
2、安装elasticsearch-head
[root@es-jypay-1 ]#cd /usr/local
[root@es-jypay-1 ]# git clone git://github.com/mobz/elasticsearch-head.git
[root@es-jypay-1 ]# cd elasticsearch-head
[root@es-jypay-1 elasticsearch-head]# npm install
[root@es-jypay-1 elasticsearch-head]# npm install grunt --save-dev
[root@es-jypay-1 elasticsearch-head]# rm -f /usr/local/bin/grunt
[root@es-jypay-1 elasticsearch-head]# ln -s /usr/local/elasticsearch-head/node_modules/grunt/bin/grunt /usr/local/bin/grunt
出现如下错误,需要安装缺少的包:
[root@es-jypay-1 elasticsearch-head]# /usr/share/elasticsearch/plugins/elasticsearch-head/node_modules/grunt/bin/grunt server
>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-concat" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?
Warning: Task "connect:server" not found. Use --force to continue.
安装方法如下:
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-clean -registry=https://registry.npm.taobao.org
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-concat -registry=https://registry.npm.taobao.org
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-watch -registry=https://registry.npm.taobao.org
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-connect -registry=https://registry.npm.taobao.org
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-copy -registry=https://registry.npm.taobao.org
[root@es-jypay-1 elasticsearch-head]# npm install grunt-contrib-jasmine -registry=https://registry.npm.taobao.org
启动head插件:
[root@es-jypay-1 elasticsearch-head]# grunt --gruntfile=/usr/share/elasticsearch/plugins/elasticsearch-head/Gruntfile.js server --force &
elasticsearch/plugins/elasticsearch-head/Gruntfile.js server --force
(node:3719) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
3、安装完成后,在网页浏览
Elasticsearch6.0 安装elasticsearch-head插件
标签:res 查询 快速 安装插件 结果 重复 blog sha 操作
原文地址:http://www.cnblogs.com/kumarhua/p/7918978.html