美文网首页
在Window7下安装Elasticsearch v7.6版本

在Window7下安装Elasticsearch v7.6版本

作者: 往后余生9375 | 来源:发表于2020-03-03 11:38 被阅读0次

1.去官网下载所需的版本和插件

红色方框内重复不用管。

image.png

解压elasticsearch7.6

运行 ./bin/elasticsearch.bat

访问:http://127.0.0.1:9200


image.png

编辑elasticsearch.yml

文件末尾追加

http.cors.enabled: true
http.cors.allow-origin: "*"

用于跨域解决,head插件使用!

安装head插件

cd elasticsearch-head
npm install
npm run start

访问http://127.0.0.1:9100

image.png

安装中文分词elasticsearch-analysis-ik-7.6.0

解压压缩文件,重命名为'ik' 移动到


image.png

重启elasticsearch生效。

配置用户名密码

xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true

设置密码

bin/elasticsearch-setup-passwords interactive

修改密码

curl -H "Content-Type:application/json" -XPOST -u elastic 'http://127.0.0.1:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "123456" }'

相关文章

网友评论

      本文标题:在Window7下安装Elasticsearch v7.6版本

      本文链接:https://www.haomeiwen.com/subject/buzflhtx.html