自学内容网 自学内容网

【ES】docker安装ES7.14.0+es-head

# 拉取镜像
docker pull elasticsearch:7.14.0
# 运行 --- 
# 拷贝数据用于挂载
docker cp -a es:/usr/share/elasticsearch/config/. /volume/es/config
# 启动容器
docker run -p 9200:9200 -p 9300:9300 --privileged=true --name es -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -v /volume/es/config:/usr/share/elasticsearch/config -d elasticsearch:7.14.0
# 拉取es-head镜像
docker pull mobz/elasticsearch-head:5
# 运行
docker run --name es-head -d -p 9100:9100 mobz/elasticsearch-head:5

eshead配置需要es开启跨域

在/usr/share/elasticsearch/config/的elasticsearch.yml下

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type


原文地址:https://blog.csdn.net/qq_58137891/article/details/139353962

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!