Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of installation examples of ElastciSearch and SQL plug-ins

2025-04-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you a sample analysis of the installation of ElastciSearch and SQL plug-ins. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

1. Lower version of ES, install SQL support

SQL can only be used in ES version 6.5 or above, so the previous demonstration of ES version 6.2 is not supported, so let's change it to version 6.5 or above.

Of course, if that's the case, what's the significance of this article? Here we show how to make the following versions of ES6.5 use statements similar to SQL queries to query the index library.

   here we need to download the plug-in: https://github.com/NLPchina/elasticsearch-sql/tree/elastic6.2.0

   then uploads the downloaded zip package to the cluster and executes:

[elk@zzy bin] $. / elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.2.0/elasticsearch-sql-5.6.2.0.zip

The execution of the above order will report:

So we have to compile painstakingly manually:

So here can only download the source code manually, compile locally, download address: https://github.com/NLPchina/elasticsearch-sql/archive/elastic6.2.0.zip

The ES-SQL plug-in compiles:

Download and decompress ①

② looks at BUILDING.md and compiles locally

Execute:

Mvn clean package assembly:single-DskipTests

After successful compilation:

There is a zip package in the target directory:

After changing the name, upload it to the cluster.

Install the sql plug-in

# see how this command is used

[elk@zzy ~] $/ applications/elasticsearch-6.2.0/bin/elasticsearch-plugin-help

# install plug-ins locally

[elk@zzy ~] $/ applications/elasticsearch-6.2.0/bin/elasticsearch-plugin install file:./elasticsearch-sql-6.2.0.0.zip

Note: where file is a local directory.

At this time, an error is also reported:

So we can only unpack the zip plug-in and put it into ES_HOME/plugins.

[elk@zzy ~] $unzip elasticsearch-sql-6.2.0.0.zip [elk@zzy ~] $mv elasticsearch-sql-6.2.0.0/ / applications/elasticsearch-6.2.0/plugins/

Finally, restart ES!

An error will also be reported at this time:

This is because of the version problem, es can not recognize the jvm and site parameters in the plug-in configuration file, and only need to delete the parameters in the corresponding plug-in.

Then start ES:

You can see that ES has loaded the corresponding SQL plug-in!

Test:

Execute in the browser:

Http://nodeIP:9200/_sql?sql=select from indexName limit 10

For example, the editor here is:

Http://192.168.130.131:9200/_sql?sql=select from library limit 10 & pretty

Here the SQL plug-in is installed successfully!

two。 Low version of ES, install Web interface to query installation

① downloads the appropriate plug-in

Https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip

Upload to the cluster and decompress: unzip es- sql-site-standalone.zip

Then execute:

Cd site-servernpm install express-savenode node-server.js

The corresponding problem is solved:

 does not have the nmp command:

[elk@zzy site-server] $sudo yum-y install gcc make gcc-c++ openssl-devel wget [elk@zzy site-server] $sudo wget http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz[elk@zzy site-server] $sudo tar zxvf http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz[elk@zzy ~] $cd node-v0.10.26/ [elk@ Zzy ~] $make & & make install # compile [root@zzy node-v0.10.26] # npm-v # to see if the installation is successful

Finally access port 192.168.130.131purl 8080 of the node:

The installation here is successful!

The above is the analysis of the installation examples of ElastciSearch and SQL plug-ins shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report