栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

最新elasticsearch 8.0 安装配置

最新elasticsearch 8.0 安装配置

2022 年 2 月 11 日,Elastic 8.0 正式发布。
这里进行试用。

首先下载elasticsearch-8.0.1-linux-x86_64.tar.gz,并解压

修改配置文件elasticsearch.yml:

cluster.name: elasticsearch
node.name: node-1
node.attr.rack: r1
path.data: /home/$USER/app/elasticsearch-8.0.1/data/
path.logs: /home/$USER/app/elasticsearch-8.0.1/logs/
network.host: 192.168.171.51
http.port: 9201
transport.profiles.default.port: 9301
discovery.seed_hosts: ["192.168.171.51:9301"]
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

其中设置:

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

主要是为了在elasticsearch head中可以进行访问。

启动elasticsearch:./bin/elasticsearch,在启动过程中会出现默认设置的密码:

这个密码可以通过命令./bin/elasticsearch-reset-password -u elastic进行重置:

在浏览器中输入https://192.168.171.51:9201/然后输入用户名和密码就可以显示状态了:

可以通过elasticsearch-head工具进行查看,需要在head地址中添加http://localhost:9100/?auth_user=elastic&auth_password=对应密码:

关闭xpack

如果不需要安全访问设置,可以将配置文件elasticsearch.yml添加设置如下:

xpack.ml.enabled: false
xpack.monitoring.collection.enabled: false
xpack.security.enabled: false
xpack.watcher.enabled: false

修改kibana设置:

server.publicbaseUrl: "http://192.168.171.51:5601"
elasticsearch.hosts: ["http://192.168.171.51:9201"]
server.host: "0.0.0.0"
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/751051.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号