ElasticSearch sql 插件安装
生活随笔
收集整理的這篇文章主要介紹了
ElasticSearch sql 插件安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
PS:6.3 開始 ElasticSearch 自身已經支持SQL查詢。
github地址:https://github.com/NLPchina/elasticsearch-sql
一、在線安裝
直接執行
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.3.2.0/elasticsearch-sql-6.3.2.0.zip二、離線安裝
下載離線安裝包,放在es目錄下
[es@jast elasticsearch-6.3.2]$ pwd /home/es/elasticsearch-6.3.2 [es@jast elasticsearch-6.3.2]$ wget https://github.com/NLPchina/elasticsearch-sql/releases/download/6.3.2.0/elasticsearch-sql-6.3.2.0.zip安裝
./bin/elasticsearch-plugin install file:/home/es/elasticsearch-6.3.2/elasticsearch-sql-6.3.2.0.zip???
查看是否安裝成功
進入es插件目錄查看,是否有相應jar包
[es@jast elasticsearch-6.3.2]$ cd plugins/ [es@jast plugins]$ ls sql [es@jast plugins]$ pwd /home/es/elasticsearch-6.3.2/plugins [es@jast plugins]$ ls sql/ druid.jar parent-join-client-6.3.2.jar elasticsearch-sql-6.3.2.0.jar plugin-descriptor.properties guava.jar reindex-client-6.3.2.jar重啟服務
在Kibana中訪問方法為:GET _sql?sql=SELECT * FROM TABLENAME
瀏覽器訪問方法為:http://ip:9200/_sql?sql=SELECT * FROM TABLENAME
三、ElasticSearch SQL 可視化工具
下載服務(支持6.x版本)
wget http://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip解壓下載文件,并安裝服務
[es@jast el_sql]$ cd site-server/ [es@jast site-server]$ ls node-server.js package.json site_configuration.json [es@jast site-server]$ npm install express --save npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN site-server No description npm WARN site-server No repository field. npm WARN site-server No license field.+ express@4.17.1 added 50 packages from 37 contributors and audited 126 packages in 19s found 0 vulnerabilities[es@jast site-server]$?修改默認端口
[es@jast es-web]$ vim site-server/site_configuration.json {"port":5602 }執行服務
node node-server.js訪問頁面可以直接執行sql了
ps: 7.x http查詢方法,使用post查詢
?
總結
以上是生活随笔為你收集整理的ElasticSearch sql 插件安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: libcurl使用方法
- 下一篇: Openresty Nginx 负载均衡