• Docker安装 RabbitMQ,Elastic6.3.0,Kibana6.3.0


    1.RabbitMQ

    docker pull rabbitmq:3.7.7-management
    docker run -d --name rabbitmq -p 15672:15672 -p 5672:5672 2888deb59dfc(默认账户密码 guest) docker run
    -d --name rabbitmq3.7.7 -p 5672:5672 -p 15672:15672 -v `pwd`/data:/var/lib/rabbitmq --hostname myRabbit -e RABBITMQ_DEFAULT_VHOST=my_vhost -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin 2888deb59dfc

    2.ElasticSearch

    2.1拉取镜像

    docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.0

    2.2创建elasticsearch文件夹用于存放docker容器内数据

    用于存放data数据
    $ mkdir -p /data/elasticsearch/data 
    用于存放log数据
    $ mkdir -p /data/elasticsearch/logs
    用于存放plugins
    $ mkdir -p /data/elasticsearch/plugins
    给文件夹设置权限
    $ chmod -R 777 /data/elasticsearch

    2.3创建elasticsearch容器

    docker run -itd --name esd -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /data/elasticsearch/logs:/usr/share/elasticsearch/logs -v /data/elasticsearch/data:/usr/share/elasticsearch/data -v /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins docker.elastic.co/elasticsearch/elasticsearch:6.3.0

    2.4设置可跨域访问

    docker exec -it esd /bin/bash
    
    vi /usr/share/elasticsearch/config/elasticsearch.yml
    
    cluster.name: "docker-cluster"
    network.host: 0.0.0.0
    
    http.cors.enabled: true
    http.cors.allow-origin: "*"
    # minimum_master_nodes need to be explicitly set when bound on a public IP
    # set to 1 to allow single node clusters
    # Details: https://github.com/elastic/elasticsearch/pull/17288
    discovery.zen.minimum_master_nodes: 1
    xpack.security.enabled: false

    2.5安装IK中文分词插件(elasticsearch容器中进行操作)

     cd /usr/share/elasticsearch
    
     ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.0/elasticsearch-analysis-ik-6.3.0.zip

    3.安装kibana

    docker pull docker.elastic.co/kibana/kibana:6.3.0
    docker run --name kibana -e ELASTICSEARCH_URL=http://10.10.33.63:9200 -p 5601:5601 -d 878491bdc281

    4.kibana登录异常处理

    Login is currently disabled. Administrators should consult the Kibana logs for more details.

    在kibana.yml和elasticsearch.yml中添加

    xpack.security.enabled: false

    后重启kibana和es即可。

     参考文章:https://www.jianshu.com/p/bd9e56ef5beb

  • 相关阅读:
    Saslauthd服务实现SMTP发信认证
    携程Apollo一键编译脚本+部署实现
    Shell编程总结
    Oracle数据库的安装 【超详细的文图详解】
    区块链技术开发导向 聊应用及正确发展方向
    单机Qps上限是多少?
    Linux运维第二课----Linux发展史、环境准备
    JAVA_新建一个方法并且求三个数中的最大值
    iOS视频边下载边播放
    Python从零搭建Conf_Web配置管理平台
  • 原文地址:https://www.cnblogs.com/cangshublogs/p/10578793.html
Copyright © 2020-2023  润新知