1、安装elasticsearch-sql插件
(1)安装elasticsearch-sql插件
D:\app\elasticsearch-7.12.0>bin\elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
-> Installing https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
-> Downloading https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
[=================================================] 100%??
-> Installed sql
-> Please restart Elasticsearch to activate any plugins installed
D:\app\elasticsearch-7.12.0>
(2)启动elasticsearch
D:\app\elasticsearch-7.12.0>bin\elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
-> Installing https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
-> Downloading https://github.com/NLPchina/elasticsearch-sql/releases/download/7.12.0.0/elasticsearch-sql-7.12.0.0.zip
[=================================================] 100%??
-> Installed sql
-> Please restart Elasticsearch to activate any plugins installed
D:\app\elasticsearch-7.12.0>bin\elasticsearch
"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Unable to get Charset 'cp65001' for property 'sun.stdout.encoding', using default UTF-8 and continuing.
[2021-08-09T16:29:32,395][INFO ][o.e.n.Node ] [TPA-VDI-OA11-17] version[7.12.0], pid[12244], build[default/zip/78722783c38caa25a70982b5b042074cde5d3b3a/2021-03-18T06:17:15.410153305Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/11.0.3/11.0.3+12-LTS]
[2021-08-09T16:29:32,403][INFO ][o.e.n.Node ] [TPA-VDI-OA11-17] JVM home [C:\Program Files\Java\jdk-11.0.3], using bundled JDK [false]
[2021-08-09T16:29:32,405][INFO ][o.e.n.Node ] [TPA-VDI-OA11-17] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=D:\Users\chengyq\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:f