• mac 容器化 安装docker & es | redis


    brew install docker

    安装桌面版 docker-destop 

    在桌面端搜索对应的es 版本 

    docker 安装elasticsearch 

    先确保java 已安装 oracle-jdk17 LTS 版本 

    报错:ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch
    2024-08-08 09:10:50 bootstrap check failure [1] of [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

    ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

    原因:启动方式不对 蛇精病 

    修改配置文件 

    mdfind elasticsearch.yml     &&  sudo  vim  elasticsearch.yml

    1. # bootstrap.ignore_system_bootstrap_checks: true
    2. #discovery.zen.minimum_master_nodes: 1
    3. network.host: 0.0.0.0
    4. #- _local_
    5. #- _site_
    6. node.name: node-1
    7. network.publish_host: 0.0.0.0
    8. cluster.initial_master_nodes: ["node-1"]
    9. # Enable scripting as described here: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
    10. script.inline: true
    11. script.stored: true
    12. script.file: true

    运行命令   输入对应的容器ID 

    docker run -e ES_JAVA_OPTS="-Xms1024m -Xmx1024m" -e "discovery.type=single-node" -d -p 9200:9200 -p 9300:9300 --name elasticsearch ce6def07c368

    curl http://localhost:9200 

    安装 redis 

    在docker desktop 上面搜索对应的redis  版本  

    在 docker desktop上面 启动 容器 或者使用命令行的方式指定容器的名称  

    docker run --name redis -p6379:6379 -d redis:7.4

    连接容器的 redis   因做了地址映射 可以直接在本地连接  

    redis-cli  

    安装ngrok    docker 容器  

    在docker desktop 上搜索 ngrok  

    运行容器 

    docker run -it--name ngrok  -e NGROK_AUTHTOKEN=token值后台获取  -d ngrok/ngrok http 8888

    docker 安装MySQL  

  • 相关阅读:
    STM32-无人机-电机-定时器基础知识与PWM输出原理
    C语言实现通讯录
    智能家居—ESP32开发环境搭建
    2022年最新java之异常
    Can 通信-协议
    混淆矩阵细致理解
    目标检测——Faster RCNN系列算法原理介绍
    图片gif怎么做?这一招分分钟制作
    Day7——四数相加||、赎金信、三数之和、四数之和
    Dubbo(四):Spring 整合 Dubbo 源码分析
  • 原文地址:https://blog.csdn.net/dwl764457208/article/details/141000605