根据现有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. svn中status为missing的文件的处理方式

    svn中status为missing的文件在每次commit时都会出现在待提交的列表里,而且它的上级文件夹前面有个红色的点,有碍观瞻,处理方式也很简单: 1.在待提交的列表里,右击该文件->de ...

  2. [转]GREP for Windows

    http://www.interlog.com/~tcharron/grep.html A very flexible grep for windows GREP is a well known to ...

  3. G - Throw nails

    来源hde4393 The annual school bicycle contest started. ZL is a student in this school. He is so boring ...

  4. react useRef()函数

    "ref"对象是一个通用容器,其current属性是可变的 保存dom function Test() { const t = useRef(null); useEffect(() ...

  5. ruby 基础知识 - Class 与 Module

    原文 1. 因為 Ruby 並沒有「屬性」(property/attribute)這樣的設計,要取用實體變數,需要另外定義的方法才行: class Cat def initialize(name, g ...

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

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

  7. Java基础&面向对象(二)

    (七)函数 1.数的定义:具有特定功能的一段小程序,也称为方法: 2.函数的特点: 3.函数的应用:结果.是否需要未知内容参与运算: 4.函数的重载:在同一个类中,允许存在一个以上的同名函数,只要它们 ...

  8. 解决在Windows10没有修改hosts文件权限

    当遇到有hosts文件不会编辑或者,修改了没办法保存”,以及需要权限等问题如图: 我学了一招,先在交给你: 1.win+R 2.进入hosts的文件所在目录: 3.我们开始如何操作才能不出现权限问题那 ...

  9. call()的个人理解

    先看两道道面试题 面试题1: var number = 50; var obj = { number: 60, getNum: function() { var number = 70; return ...

  10. ASP.NET Core ResponseCaching:基于 VaryByHeader 定制缓存 Key

    ASP.NET Core ResponseCaching 提供了缓存http响应内容的能力,通过它可以在本地内存中直接缓存http响应内容,这是速度最快的服务端缓存,省却了网络传输与生成响应内容的开销 ...