es-sql(5.4.0)鸡肋安装

es-sql(5.4.0)安装过程(步履艰辛)

1、下载插件包

1、第一步

首先吐槽一下es-sql github,没看懂那个过程,下面进入正题,下载插件

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.0.0/elasticsearch-sql-5.4.0.0.zip

2、第二步

github标注5.0之上需要下载下面这个玩意,老老实实下载

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

2、解压操作

1、解压上面第二步安装的
unzip es-sql-site-standalone.zip

2、进行目标文件夹
cd es-sql-site
cd site-server

3、下一步操作
npm install express --save

4、这里成功
node node-server.js

如果上面3有问题,linux没有装npm,请进行以下操作,一行一行来

curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install
npm run buildnpm -v

最终出现这个就可再返回上面进行第3步

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-WmEb6sFc-1627728886662)(../AppData/Roaming/Typora/typora-user-images/image-20210731184456204.png)]

3、访问

默认的es-sql端口号是8080,如有冲突需要修改,下面操作

cd es-sql-site/site-server
vim site_configuration.json

出现如图表示没问题[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-jZn9L0zr-1627728886663)(../AppData/Roaming/Typora/typora-user-images/image-20210731184844783.png)]

4、最后一步

有的小伙伴可能会在上图出错,报错:Error:Error occured! response is not avalible.,那是需要修改elasticsearch配置文件,添加下面代码

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

5、重启es

重新启动es,打开es-sql web页面,就可以写sql啦,默认的库相当于索引

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

友培

数据皆开源!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值