1、进入Docker
docker exec -it --user root xxxxxx sh
2、安装vim
atp update
apt install vim
3、找到elasticsearch.yml
路径在:/usr/share/elasticsearch/config/elasticsearch.yml
4、修改elasticsearch.yml
vim elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 06-10-2022 12:11:25
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["6583cdb67397"]
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
退出并保存
重新启动docker

本文介绍了如何在Docker环境中配置Elasticsearch的安全特性。包括安装必要的编辑工具、定位配置文件、具体设置集群名称及网络主机等参数,并详细展示了安全配置部分的启用与禁用选项。

3565

被折叠的 条评论
为什么被折叠?



