码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 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  

  • 相关阅读:
    Python 基于 OpenCV 视觉图像处理实战 之 OpenCV 简单人脸检测/识别实战案例 之二 简单人脸检测添加戴眼镜效果
    javaweb 之 HTML快速入门 常用标签 转义字符
    Java毕设项目思路:疫情反复?校园疫情信息系统可以这样做
    rpi3 and rpi4 native build
    hadoop2-hive
    【Java-LangChain:使用 ChatGPT API 搭建系统-6】处理输入-链式 Prompt Chaining Prompts
    java毕业设计电影院售票系统Mybatis+系统+数据库+调试部署
    详解:递归 和 排序(冒泡排序,选择排序,插入排序,归并排序,快速排序,希尔排序)
    Mysql之进阶查询语句
    【开源】基于JAVA的超市自助付款系统
  • 原文地址:https://blog.csdn.net/dwl764457208/article/details/141000605
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号