ES
安装elasticsearch
docker network create es-net
docker pull elasticsearch:7.12.1
mkdir -p /opt/elasticsearch/config
mkdir -p /opt/elasticsearch/data
mkdir -p /opt/elasticsearch/plugins
echo "http.host: 0.0.0.0" >> /opt/elasticsearch/config/elasticsearch.yml
docker run --name elasticSearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-v /opt/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /opt/elasticsearch/data:/usr/share/elasticsearch/data \
-v /opt/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
--network es-net \
--privileged \
elasticsearch:7.12.1
出现ncaught exception in thread [main]", 报错
chmod -R 777 /opt/elasticsearch/
安装kibana
docker pull kibana:7.12.1
mkdir -p /opt/kibana
echo "server.host: 0.0.0.0" >> /opt/kibana/kibana.yml
echo "elasticsearch.hosts: ["http://elasticSearch:9200"] >> /opt/kibana/kibana.yml
docker run --name kibana -v /opt/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml -p 5601:5601 -d kibana:7.12.1
安装ik分词器
选择与es对应的版本
unzip elasticsearch-analysis-ik-7.12.1.zip
docker restart elasticSearch
ch-analysis-ik-7.12.1.zip
docker restart elasticSearch