--主节点
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
cluster.name: escluster7.6
node.name: master
network.host: 0.0.0.0
network.publish_host: 192.168.31.187
http.port: 9200
transport.tcp.port: 9300
cluster.initial_master_nodes: ["192.168.31.187:9300","192.168.31.187:9301","192.168.31.187:9302"] #初始主节点,必须三个节点都启动,集群才能启动成功。
discovery.seed_hosts: ["192.168.31.187:9300","192.168.31.187:9301","192.168.31.187:9302"] #发现主节点
xpack.security.enabled: true #用户密码登陆验证
从节点
--node1
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Cont