elasticsearch安装

软件下载

https://www.elastic.co/cn/downloads/elasticsearch

docker 安装

version: '3'
services:
  cerebro:
    image: lmenezes/cerebro:0.8.3
    container_name: cerebro
    ports:
      - "9000:9000"
    command:
      - -Dhosts.0.host=http://es:9200
    networks:
      - net-es
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.1.0
    container_name: es
    environment:
      - discovery.type=single-node
      - cluster.name=elasticsearch
      - bootstrap.memory_lock=true
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata:/usr/share/elasticsearch
    ports:
      - "9200:9200"
      - "9300:9300"
    networks:
      - net-es
  kibana:
    image: docker.elastic.co/kibana/kibana:7.1.0
    container_name: kibana
    ports:
      - "5601:5601"
    environment:
      - elasticsearch.hosts=http://es:9200
      - server.name=kibana
      - server.host=0
      - I18N_LOCALE=zh-CN
      - XPACK_GRAPH_ENABLED=true
      - TIMELION_ENABLED=true
      - XPACK_MONITORING_COLLECTION_ENABLED="true"
    networks:
      - net-es
volumes:
  esdata:
    driver: local

networks:
  net-es:
    external: false

查看

curl localhost:9200

{
  "name" : "LqZOtqC",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "dsiqllKiSTiRqgdExRCVzw",
  "version" : {
  "number" : "6.8.7",
  "build_flavor" : "default",
  "build_type" : "docker",
  "build_hash" : "c63e621",
  "build_date" : "2020-02-26T14:38:01.193138Z",
  "build_snapshot" : false,
  "lucene_version" : "7.7.2",
  "minimum_wire_compatibility_version" : "5.6.0",
  "minimum_index_compatibility_version" : "5.0.0"
},

"tagline" : "You Know, for Search"

文章作者: 凌云
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 凌云 !
  目录