首页 > 其他分享 >Docker 部署 Elasticsearch 8.6.2

Docker 部署 Elasticsearch 8.6.2

时间:2023-09-23 16:16:00浏览次数:50  
标签:security 8.6 yml elasticsearch Elasticsearch Docker docker

Docker 部署 Elasticsearch 8.6.2

docker pull elasticsearch:8.6.2
mkdir -pv /home/zonglin/elasticsearch/plugins

sudo docker run --name elasticsearch -p 9200:9200  -p 9300:9300 \
 --restart=always \
 -e "discovery.type=single-node" \
 -e ES_JAVA_OPTS="-Xms84m -Xmx512m" \
 -v /home/zonglin/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
 -d elasticsearch:8.6.2

修改默认开启了ssl认证SpringBoot整合ES(8.0版本)(一) - 我心如雷 - 博客园 (cnblogs.com)

# 拷贝到容器文件本地
docker cp 240e18143687:/usr/share/elasticsearch/config/elasticsearch.yml ./elasticsearch.yml

# 本地文件拷贝容器
docker cp ./elasticsearch.yml 240e18143687:/usr/share/elasticsearch/config/elasticsearch.yml

Elasticsearch 配置参数说明

# 集群名称
cluster.name: "docker-cluster"

# 设置节点绑定地址 (IPv4 or IPv6)
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 23-03-2023 12:31:51
#
# --------------------------------------------------------------------------------

  # 启用安全功能默认是https需要密码, false: http 不需用密码
xpack.security.enabled: false

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

标签:security,8.6,yml,elasticsearch,Elasticsearch,Docker,docker
From: https://www.cnblogs.com/liuzonglin/p/17724484.html

相关文章

  • Elasticsearch 常用指令
    Elasticsearch常用指令查询所有节点$curl'http://127.0.0.1:9200/_cat/nodes'192.168.31.127496102.162.112.03dilmrt*node-1查询集群状态$curl-k'http://127.0.0.1:9200/_cluster/health?pretty'{"cluster_name":"docker-clus......
  • ElasticSearch 查询练习
    ......
  • Elasticsearch 配置参数
    Elasticsearch配置参数1.elasticsearch配置文件说明:elasticsearch: bin: lib: modules: logs: plugins: config: elasticsearch.yml#elasticsearch配置文件 jvm.options#jvm配置文件 log4j2.properties#......
  • elasticsearch 集群搭建
    elasticsearch集群搭建elasticsearch.ymlcluster.name:bigdatanode.name:node-1path.data:/usr/local/las/data/elasticsearchpath.logs:/usr/local/las/log/elasticsearchbootstrap.memory_lock:falsebootstrap.system_call_filter:falsenetwork.host:0.0.0.0ne......
  • ElasticSearch RestFul 风格
    ......
  • elasticsearch 自定义字典
    ......
  • docker-compose 部署 phpmyadmin
    docker-compose.yamlversion:'3.9'services:phpmyadmin:image:phpmyadmincontainer_name:phpmyadminrestart:alwaysprivileged:trueenvironment:-PMA_HOST=192.168.0.152ports:-"8081:80"ne......
  • docker-compose 部署 RabbitMQ
    docker-compose部署RabbitMQdocker-compose.ymlversion:'3.5'services:rabbitmq:restart:alwaysimage:rabbitmq:managementcontainer_name:rabbitmqhostname:rabbitports:-5672:5672-15672:15672environm......
  • docker-compose 安装 redis
    docker-compose安装redisversion:"3.5"services:lcloud-redis:image:redis:6.2container_name:lcloud-redisrestart:alwaysports:-6379:6379安装运行#docker-composeup-d--build......
  • Docker 部署 Redis
    Docker部署Redis参考资料:史上最详细Docker安装Redis拉取镜像dockerpullredis:latest创建数据卷#创建本地映射目录mkdir-p/mydata/redis/data#创建本地映射文件touch/mydata/redis/conf/redis.conf参数说明:-p:多级目录创建启动容器dockerrun--restart=......