• docker 安装es/elasticsearch7.8.0


     依次执行以下命令

    docker pull elasticsearch:7.8.0
    
    mkdir -p /mydata/elasticsearch/{config,data,plugins}
    echo "http.host: 0.0.0.0" > /mydata/elasticsearch/config/elasticsearch.yml
    #不给权限启动会报错
    chmod -R 775 /mydata/elasticsearch/
    
    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
    # 查看集群健康状态
    curl 127.0.0.1:9200/_cat/health?v
    # 查看节点健康状态
    curl 127.0.0.1:9200/_cat/nodes?v
    # 查看索引信息
    curl 127.0.0.1:9200/_cat/indices?v

    执行 curl http://127.0.0.1:9200/ 查看版本

    {
      "name" : "elasticsearch",
      "cluster_name" : "docker-cluster",
      "cluster_uuid" : "vkFxD09DQn6Uq9LZI4lGHQ",
      "version" : {
        "number" : "7.8.0",
        "build_flavor" : "default",
        "build_type" : "docker",
        "build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
        "build_date" : "2020-06-14T19:35:50.234439Z",
        "build_snapshot" : false,
        "lucene_version" : "8.5.1",
        "minimum_wire_compatibility_version" : "6.8.0",
        "minimum_index_compatibility_version" : "6.0.0-beta1"
      },
      "tagline" : "You Know, for Search"
    }
  • 相关阅读:
    【luogu2756】 飞行员配对方案问题 [二分图匹配 匈牙利算法]
    [APIO2008]紧急集合
    2019.8.27 Za
    【luogu2763】试题库问题 [网络流 最大流]
    [CQOI2014]危桥 [网络流 最大流]
    【luogu1231】教辅的组成 [网络流 最大流]
    【网络流】
    【2019.8.24】
    【匈牙利算法】
    2019.8.23 Za [数论]
  • 原文地址:https://www.cnblogs.com/-mrl/p/13866837.html
Copyright © 2020-2023  润新知