docker安裝elasticsearch
1、拉取es 鏡像
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0
2、運行elasticsearch
docker run -di --name es01 --restart=always -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" 7ec4f35ab452
3、安裝ik分詞插件
docker exec -it elastic770 /bin/bash ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.7.0/elasticsearch-analysis-ik-7.7.0.zip
4、其他配置
docker exec -it elastic770 /bin/bash
yum update
yum install vim
vim /config/elasticsearch.yml
5、修改elasticsearch.yml
cluster.name: "elasticsearchSZGHJ"
network.host: 0.0.0.0
node.name: node0
http.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
6、安裝可視化管理工具
docker run -p 9800:9800 -d --link es01:hd containerize/elastichd
7、瀏覽器中查看
在瀏覽器打開http://localhost:9800
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/259197.html
標籤:其他
