elasticsearch使用简介 -安装篇
首先呢,先准备一个docker-compose.yml镜像
version: '2.2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1 container_name: elasticsearch7.1.1 environment: - discovery.type=single-node - "ES_JAVA_OPTS=-Xms512m -Xmx512m" volumes: - esdata:/usr/share/elasticsearch/data hostname: elasticsearch restart: always ports: - 9200:9200 - 9300:9300 kibana: image: docker.elastic.co/kibana/kibana:7.1.1 container_name: kibana7.1.1 environment: - I18N_LOCALE=zh-CN - elasticsearch.hosts=http://elasticsearch:9200 hostname: kibana depends_on: - elasticsearch restart: always ports: - "5601:5601" logstash: image: docker.elastic.co/logstash/logstash:7.1.1 container_name: logstash7.1.1 hostname: logstash restart: always depends_on: - elasticsearch ports: - 9600:9600 - 5044:5044 volumes: esdata: driver: local
然后 直接 docker-compose up 将镜像拉下来啊,如果你本地有 就可以直接 启动本地的镜像;如果没有 就会去 远程把镜像拉下来了;
具体的elasticsearch的配置也可以写到这个yml的文件中,在启动时 会直接配置
当然如果你不喜欢使用docker的方式安装,也可以直接去华为镜像下载;下载以后呢 进入bin/启动
https://mirrors.huaweicloud.com/elasticsearch/ https://repo.huaweicloud.com/kibana/