根据现有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. Q - Girls and Boys

    来源poj1068 In the second year of the university somebody started a study on the romantic relations be ...

  2. 10.17小结:table.copy() 和 distinct 查询

    1. 当datatable 已存在于一个dataset中时,可以使用 ds.tables.add(dt.copy()) 来向dataset 中添加datatable; 2. 当datarow已存在于一 ...

  3. Springboot的常规属性配置和类型安全配置

    1.类型常规配置: 通过在properties文件中注入键值对的方式,在java代码中通过@Value注解注入值 2.类型安全配置 将要注入的属性包装成一个类,给类加上注解:ConfigrationP ...

  4. day15 十五、模块、from导入、起别名

    一.模块的概念 1.什么是模块:一系列功能的集合体 2.定义模块:创建一个py文件就是一个模块,该py文件名就是模块名 模块的四种存在方式 使用python编写的.py文件 包:一堆py文件的集合体 ...

  5. windos上安装jenkins部署springboot的jar包(未运行,只是在打包并上传linux成功了)

    流程: 从linux上的svn拉取代码,到本地(windos)jenkins的工作区间的workspace,然后通过构建,打包,部署到linux上 环境: windos上安装:maven jdk je ...

  6. iOS之关于Architectures设置及Build Active Architecture Only编译设置

    一,前言 最近在帮朋友解决极光报错的提示:“file was built for archive which is not the architecture being linked (i386)”时 ...

  7. 获取子字符串函数MidStr

    MidStr返回指定范围内的字符串.该函数有三个参数.第一个参数为源字符串,第二个参数为起点(下标从1开始),第三个参数为结束点.通过第二.第三个参数则可指定要复制字符串的范围. function M ...

  8. python pynput监听键盘

    """小白随笔,大佬勿喷""" #键盘输入 from pynput.keyboard import Key,Controller,Liste ...

  9. pwn学习日记Day4 基础知识积累

    知识杂项 *:字符串重复 空指令NOP:\x90 cmp:是比较指令,cmp的功能相当于减法指令.它不保存结果,只是影响相应的标志位. xor:将两个操作数进行异或运算,并将结果存放到操作数1中. s ...

  10. cocos2d-x JS 定时器暂停方法

    this.scheduleOnce(function(){ this.addChild(Menugobtn);//要暂停执行的代码 }, 10);