根据现有ES版本,安装对应版本的插件

[es@hxl ~]$ cd elasticsearch
[es@hxl elasticsearch]$ ./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.0.0/elasticsearch-sql-6.5.0.0.zip

安装完sql插件后,最好重启一下es!

2、安装elasticsearch-sql前端页面

2.1 安装及更新一些依赖包
[root@hxl ~]# yum -y install epel-release
[root@hxl ~]# yum -y install npm
[root@hxl ~]# yum -y update openssl

2.2 下载安装elasticsearch-sql前端页面,并使用node命令启动
[es@hxl ~]$ wget https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip
[es@hxl ~]$ unzip es-sql-site-standalone.zip
[es@hxl ~]$ cd site-server/
[es@hxl site-server]$ npm install express --save
[es@hxl site-server]$ node node-server.js

2.3 启动成功后,直接访问es主机地址的8080端口即可

3、elasticsearch-sql前端web默认端口修改

有时候可能8080端口我们已经有在使用了,这样elasticsearch-sql就没办法正常启动了,需要修改一下配置文件,重新启动即可。
[es@hxl ~]$ vi site-server/site_configuration.json
{
"port":9090
}
[es@hxl ~]$

4、使用sql查询es数据报错Cannot POST /_sql处理

测试使用sql查询es索引数据,发现有如下报错:
Error:"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">
直接修改web页面右上角文本框中连接地址为es节点查询地址,然后直接点下方search重新查询即可
如下,地址后面必须带上/
http://192.168.1.136:19200/

5.遇到错误1
Error:Error occured! response is not avalible.
解决办法,修改es配置文件
http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: WWW-Authenticate,X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization

6.安装了xpack不想输入用户名密码
修改elasticsearch.yml,添加:

xpack.security.enabled: false

7.用户密码验证访问
​要是es部署了x-pack的话,需要用户和密码验证,则es-sql采用如下访问:
​http://192.168.1.136:8080/?username=elastic&password=elastic&base_uri=http://192.168.1.136:19200​

格式为:​http://es-sql-host:8080/?username=elastic&password=elastic&base_uri=es-server:19200​

es安装elasticsearch-sql插件的更多相关文章

  1. 安装Elasticsearch可视化插件

    背景 项目中使用Elasticsearch , 最开始14年使用的时候需要es自己安装插件才能通过web页面查看数据情况,目前新版本的ES安装插件很费劲,通过搜索发现目前谷歌浏览器就有这个插件,这里简 ...

  2. 五十七.分布式ELK平台、ES安装 、 扩展插件 、Kibana安装

    1. ES集群安装 准备1台虚拟机 部署elasticsearch第一个节点 访问9200端口查看是否安装成功   1ELK是日志分析平台,不是一款软件,而是一整套解决方案,是三个软件产品的首字母缩写 ...

  3. elasticsearch sql插件 2.4及以下版本配置

    github地址:https://github.com/NLPchina/elasticsearch-sql/ 方式一:github elasticsearch-sql上提供的安装方法cmd进入到本地 ...

  4. linux(centos 7)下安装elasticsearch - head插件(端口占用,防火墙关闭)

    本文章来自网络仅供个人学习记录之用 一:安装Git(如果未安装) 1, yum install git 2, git --version #查看版本 二:安装node(如果未安装) node安装 三: ...

  5. Mac下安装ElasticSearch及其插件

    目录 环境介绍 安装过程 安装Kibana 环境介绍 软件版本:ElasticSearch7.0.0 Kibana7.0.0 系统环境:mac 环境 安装过程 官网下载 ElasticSearch7. ...

  6. elasticsearch sql插件配置(5.0及以上版本)

    github官方参考地址:https://github.com/NLPchina/elasticsearch-sql/ 采用 git + node 的方式,所以安装前需要先安装好node,node n ...

  7. ubuntu安装elasticSearch及插件

    原文地址:http://www.niu12.com/article/18 前提 1.安装好Java1.8以上环境并配置好JAVA_HOME(elasticsearch运行环境) 2.node环境6.5 ...

  8. 搜索引擎ElasticSearch系列(四): ElasticSearch2.4.4 sql插件安装

    一:ElasticSearch sql插件简介 With this plugin you can query elasticsearch using familiar SQL syntax. You ...

  9. ElasticSearch安装SQL插件

    ElasticSearch安装SQL插件下载地址(中国大佬开发的,膜拜ing):https://github.com/NLPchina/elasticsearch-sql 1.记得选择和自己Elast ...

随机推荐

  1. [原]Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused

    web site : https://opsx.alibaba.com/mirror 运行后出现下面的Error: base//x86_64/other_db FAILED http://mirror ...

  2. Linux下的awk文本分析命令实例(一)

    1.  入门实例1.1 显示最近登录的5个帐号: [root@localhost ~]# | awk '{print $1}' root root root root reboot 1.2 如果只是显 ...

  3. Logistic 最大熵 朴素贝叶斯 HMM MEMM CRF 几个模型的总结

    朴素贝叶斯(NB) , 最大熵(MaxEnt) (逻辑回归, LR), 因马尔科夫模型(HMM),  最大熵马尔科夫模型(MEMM), 条件随机场(CRF) 这几个模型之间有千丝万缕的联系,本文首先会 ...

  4. error_match问题

    当nginx的sendfile处于on的情况下,在docker的环境下修改js文件会出现error_match的问题,应该要在nginx的配置中把sendfile设为off

  5. canvas里设置width和css里设置width和js里设置width的区别

    canvas.width 和 它的style.width是不一样的: canvas是个画布,有他自己的宽和高(默认是没有单位的纯数字),就是canvas.width和canvas.height的宽和高 ...

  6. 补充:javascript

    写法分类:1.行内(内联)写在标签里面,以属性的形式表现,属性名是事件属性名例如:<button onClick="js代码"></button>2.内嵌写 ...

  7. JS实现表格使用上下左右键聚集

    //调用:new tabTableInput("tblGrid","text"); var tabTableInput = function (tableId, ...

  8. 关于vue执行打包后,如何在本地浏览问题

    最近一个人在捣鼓vue,写完项目后发现在npm run dev下可以正常访问,bulid之后却一片空白,查看console出现许多Failed to load resource: net::ERR_F ...

  9. win10系统激活

    我们常常使用一些激活工具来激活,效果可能比较差.比如我激活win10教育版,下载了很多软件无论如何都不能激活.但是使用命令行很容易就激活了. 1. 2.在命令提示符中依次输入: slmgr.vbs / ...

  10. idea便利配置使用配置

    让properties能够中文正确显示 1.file encoding ---改为utf-8 spring的autowried没得错误,mybaties没得黄色背景 inspections--spri ...