swarm 安装 ES-7.17.9 (四)
#配置密码
需要先开启xpack,否则报错,进入一个节点配置密码
bin/elasticsearch-setup-passwords interactive
密码:Meng@
浏览器访问验证:
输入用户:elastic 密码:Meng@
http://node1:9200/_cluster/health?pretty
或http://192.168.10.14:9200/
#命令行下验证
[root@node1 es]# curl http://node1:9200/_cluster/health?pretty -u elastic:Meng@{ "cluster_name" : "elasticsearch-cluster", "status" : "green", "timed_out" : false, "number_of_nodes" : 3, "number_of_data_nodes" : 3, "active_primary_shards" : 11, "active_shards" : 22, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 100.0}