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

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

相关推荐
HGW6894 小时前
基于 Elasticsearch 实现地图点聚合
java·elasticsearch·高德地图
小袁拒绝摆烂10 小时前
ElasticSearch快速入门-1
大数据·elasticsearch·搜索引擎
GISer_Jing17 小时前
Git协作开发:feature分支、拉取最新并合并
大数据·git·elasticsearch
高山莫衣1 天前
git rebase多次触发冲突
大数据·git·elasticsearch
kobe_OKOK_1 天前
【团队开发】git 操作流程
git·elasticsearch·团队开发
大只鹅1 天前
Springboot3.3.4使用spring-data-elasticsearch整合Elasticsearch7.12.1
spring boot·elasticsearch
二闹1 天前
SLF4J/Logback 配置与 ELK 集成实战指南
后端·elasticsearch·logstash
G皮T2 天前
【Elasticsearch】全文检索 & 组合检索
大数据·elasticsearch·搜索引擎·全文检索·match·query·组合检索
Elastic 中国社区官方博客11 天前
如何在 Python 中连接 Elasticsearch 并使用 Qwen3 来实现 RAG
大数据·人工智能·python·elasticsearch·搜索引擎·阿里云·全文检索
jiedaodezhuti11 天前
Elasticsearch 如果保证读写一致
大数据·elasticsearch·搜索引擎