• ES


    1. 下载ealastic search和kibana

    docker pull elasticsearch:7.6.2
    docker pull kibana:7.6.2

      

    2. 预配置

    //新建一些文件夹,之后要用作目录挂载
    mkdir -p /mydata/elasticsearch/config
    mkdir -p /mydata/elasticsearch/data
    
    //在配置文件中,添加一个配置
    echo "http.host: 0.0.0.0" >/mydata/elasticsearch/config/elasticsearch.yml
    
    //修改该文件夹的权限,777代表“可读可写可执行”
    chmod -R 777 /mydata/elasticsearch/

    3. 启动Elastic search

    docker run --name elasticsearch -p 9200:9200 -p 9300:9300 
    -e  "discovery.type=single-node" 
    -e ES_JAVA_OPTS="-Xms64m -Xmx512m" 
    -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.6.2 

    设置开机启动elasticsearch

    docker update elasticsearch --restart=always

    4. 启动kibanba

    docker run --name kibana -e ELASTICSEARCH_HOSTS=http://192.168.137.14:9200 -p 5601:5601 -d kibana:7.6.2

    设置开机启动kibana

    docker update kibana  --restart=always

    5. 测试

    通过postman,查看elasticsearch版本信息: http://192.168.137.14:9200/

    {
        "name": "0adeb7852e00",
        "cluster_name": "elasticsearch",
        "cluster_uuid": "9gglpP0HTfyOTRAaSe2rIg",
        "version": {
            "number": "7.6.2",
            "build_flavor": "default",
            "build_type": "docker",
            "build_hash": "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
            "build_date": "2020-03-26T06:34:37.794943Z",
            "build_snapshot": false,
            "lucene_version": "8.4.0",
            "minimum_wire_compatibility_version": "6.8.0",
            "minimum_index_compatibility_version": "6.0.0-beta1"
        },
        "tagline": "You Know, for Search"
    }

    显示elasticsearch 节点信息http://192.168.137.14:9200/_cat/nodes

    127.0.0.1 76 95 1 0.26 1.40 1.22 dilm * 0adeb7852e00

    访问Kibana: http://192.168.137.14:5601/app/kibana

  • 相关阅读:
    用List绑定GridView的简单辅助类
    宋忠玲(帮读者名字作诗)
    [转帖]每天看一遍,释怀所有难过
    30岁,我们怎么赢?
    柴门远望
    创业,不要被那些成功人士所忽悠
    一只海燕飞过来
    成功者都在用的“成功咒语”
    诗歌复兴
    游熊猫基地有感
  • 原文地址:https://www.cnblogs.com/frankcui/p/15437791.html
Copyright © 2020-2023  润新知