开启远端访问,这个才是对的,其他百度的不行,自己注意下

network.bind_host: 0.0.0.0
http.port: 9200

cluster.initial_master_nodes: ["node-1","node-2"]

xpack.security.enabled: false

开启密码认证

elasticsearch.yml

xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true

bin文件夹下

./elasticsearch-setup-passwords interactive

修改密码一般用不到

curl -H "Content-Type:application/json" -XPOST -u elastic 'http://127.0.0.1:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "123456" }'

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐