elasticsearch-head 安装配置
# 查看当前所开放的端口
firewall-cmd --zone=public --list-ports
firewall-cmd --zone=public --add-port=9100/tcp --permanent
# 更新防火墙规则,使端口生效
firewall-cmd --complete-reload
mkdir /disk/elasticsearch-head
创建docker-compose.yml
version: '3.7'
services:
es-head:
image: mobz/elasticsearch-head:5
container_name: es-head
ports:
- "9100:9100"
networks:
- elastic
networks:
elastic:
driver: bridge
修改elasticsearch配置
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE
http.cors.allow-headers: Content-Type,Accept,Authorization,x-requested-with
重启容器
localhost:9100
配置elasticsearch集群 http://localhost:9200/
连接成功