elasticsearch7安全配置--最低安全等级,用户名密码

上一篇博客在centos7上安装了elasticsearch7

接下来对elasticsearch进行安全方面的配置

minimal security 最低安全等级,用户名密码

首先开启xpack

vim config/elasticsearch.yml

shell 复制代码
xpack.security.enabled: true

由于我是单机配置的,还加了如下配置

shell 复制代码
discovery.type: single-node

启动,报错如下
java.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]

我们关闭集群master配置

shell 复制代码
#cluster.initial_master_nodes: ["node-1"]

重新启动elasticsearch,就看到需要输入用户名密码了

设置密码

可以通过

shell 复制代码
./bin/elasticsearch-setup-passwords auto

自动生成密码,在控制台可以看到生成的密码,输入密码后就可以登录了

相关推荐
Elastic 中国社区官方博客9 小时前
带地图的 RAG:多模态 + 地理空间 在 Elasticsearch 中
大数据·人工智能·elasticsearch·搜索引擎·ai·语言模型·全文检索
qq_3564086612 小时前
es通过分片迁移迁移解决磁盘不均匀问题
java·数据库·elasticsearch
h_k1008612 小时前
当GitHub宕机时,我们如何协作?
大数据·elasticsearch·搜索引擎
Elasticsearch19 小时前
使用 LangExtract 和 Elasticsearch
elasticsearch
程序员TNT21 小时前
开源商城 Shoptnt 的搜索引擎之心:基于 Elasticsearch 的高性能商品搜索实现
elasticsearch·搜索引擎·开源
在未来等你1 天前
Elasticsearch面试精讲 Day 13:索引生命周期管理ILM
大数据·分布式·elasticsearch·搜索引擎·面试
Elastic 中国社区官方博客1 天前
Elasticsearch:智能搜索的 MCP
大数据·人工智能·elasticsearch·搜索引擎·全文检索
伍哥的传说1 天前
Lodash-es 完整开发指南:ES模块化JavaScript工具库实战教程
大数据·javascript·elasticsearch·lodash-es·javascript工具库·es模块·按需导入
不会聊天真君6471 天前
ES(springcloud笔记第五期)
笔记·elasticsearch·spring cloud
时空自由民.1 天前
repo 学习教程
大数据·学习·elasticsearch