zoukankan      html  css  js  c++  java
  • 谷粒商城微服务分布式高级篇:linux下使用docker安装ElasticSearch

    [root@localhost ~]# docker pull elasticsearch:7.8.0  安装elasticsearch:7.8.0
    [root@localhost ~]# docker pull kibana:7.8.0 安装安装elasticsearch:7.8.0版本对应的可视化工具

    创建文档
    [root@localhost ~]# mkdir -p /mydata/elasticsearch/data
    [root@localhost ~]# mkdir -p /mydata/elasticsearch/config

    进入mydata/elasticsearch/config下,这里的host后面必须要有空格,因为是yml文件,否则无法识别
    [root@localhost config]# echo "http.host: 0.0.0.0">>/mydata/elasticsearch/config/elasticsearch.yml

    进行挂载
    [root@localhost config]# docker run --name elasticsearch -p 9200:9200 -p 9300:9300
    -e "discovery.type=single-node"
    -e ES_JAVA_OPTS="-Xms64m -Xmx128m"
    -v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
    -v /mydata/elasticsearch/data:/usr/share/elasticsearch/data
    -v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins
    -d elasticsearch:7.8.0

    进入elasticsearch目录,开放/mydata/elasticsearch/权限
    [root@localhost elasticsearch]# chmod -R 777 /mydata/elasticsearch/


    查看id号后启动:
    [root@localhost elasticsearch]# docker ps -a
    [root@localhost elasticsearch]# docker start e19

    成功界面:

     【ES从入门到实战】完整合集版,带思维导图:https://juejin.im/post/5edaefb06fb9a047de53d131

  • 相关阅读:
    2.6.2.MySQL主从复制的原理
    2.4.5 MySQL InnoDB重做与回滚介绍
    PRML读书笔记_绪论曲线拟合部分
    python3_字符串
    PRML读书笔记_绪论
    python3_列表、元组、集合、字典
    linux_软件安装
    shell获取帮助
    linux_查看磁盘与目录容量
    linux_压缩解压命令(zip/tar)
  • 原文地址:https://www.cnblogs.com/linchenguang/p/13172026.html
Copyright © 2011-2022 走看看