06、ElasticStack系列,第六章:elasticsearch设置密码

第六章:Elasticsearch设置密码

一、修改配置文件

xml 复制代码
##进入容器
docker exec -it elasticsearch bash

##启用认证
vi config/elasticsearch.yml
添加如下内容:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

##重启容器
docker restart elasticsearch

二、设置用户密码

xml 复制代码
##重启容器后,再次进入容器
docker exec -it elasticsearch /bin/bash
##执行一下命令
./bin/elasticsearch-setup-passwords interactive

##会 出现如下内容:
出现:Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]

##输入y  挨个输入密码即可

Please confirm that you would like to continue [y/N]y


Enter password for [elastic]: 
Reenter password for [elastic]: 
Enter password for [apm_system]: 
Reenter password for [apm_system]: 
Enter password for [kibana]: 
Reenter password for [kibana]: 
Enter password for [logstash_system]: 
Reenter password for [logstash_system]: 
Enter password for [beats_system]:

Reenter password for [beats_system]: 
Enter password for [remote_monitoring_user]: 
Reenter password for [remote_monitoring_user]: 
Changed password for user [apm_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]


##重启容器
docker restart elasticsearch

三、验证

xml 复制代码
http://192.168.73.107:9200/


相关推荐
电商数据girl32 分钟前
如何利用API接口与网页爬虫协同进行电商平台商品数据采集?
大数据·开发语言·人工智能·python·django·json
TDengine (老段)33 分钟前
TDengine 中 TDgpt 异常检测的数据密度算法
java·大数据·算法·时序数据库·iot·tdengine·涛思数据
蚂蚁数据AntData1 小时前
DB-GPT 0.7.3 版本更新:支持Qwen3 Embedding和Reranker模型、支持知识库自定义检索策略等
大数据·开源·全文检索·数据库架构
暖苏2 小时前
python-异常(笔记)
大数据·开发语言·笔记·python·异常
松果财经4 小时前
外卖“0元购”退场后,即时零售大战才刚开始
大数据·人工智能
永洪科技5 小时前
永洪科技华西地区客户交流活动成功举办!以AI之力锚定增长确定性
大数据·人工智能·科技·数据分析·数据可视化
snpgroupcn5 小时前
如何管理数据足迹,实现SAP S/4HANA的无缝迁移
大数据·云计算
武子康5 小时前
大数据-58 Kafka 消息发送全流程详解:序列化、分区策略与自定义实现
大数据·后端·kafka
所念皆为东辞6 小时前
gitlab+jenkins的ci/cd部署
运维·ci/cd·gitlab·jenkins
shengyicanmou6 小时前
2025年物联网新趋势:格行随身WiFi的模块化架构与低延迟优化
大数据·人工智能