赞
踩
docker pull elasticsearch:7.12.1
docker run --name elasticsearch -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.12.1
1、进入容器&打开文件
- docker exec -it es bash
- cd config
- vi elasticsearch.yml
2、编辑文件
- http.cors.enabled: true
- http.cors.allow-origin: "*"
- http.cors.allow-headers: Authorization
- xpack.security.enabled: true
- xpack.security.transport.ssl.enabled: true
3、重启es并设置密码
- cd bin
- elasticsearch-setup-passwords interactive
- // 输出
- Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
- You will be prompted to enter passwords as the process progresses.
- Please confirm
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。