二 Elasticsearch 基础之安装( 六 )


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━? Elasticsearch security features have been automatically configured!? Authentication is enabled and cluster connections are encrypted.??Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):kT62lzIOXGu6NRWwNw0Q??HTTP CA certificate SHA-256 fingerprint:e879957d366063beb27b20852f7bcf403801213732e9ccfcfefae06a6f1053fe??Configure Kibana to use this cluster:? Run Kibana and click the configuration link in the terminal when Kibana starts.? Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):eyJ2ZXIiOiI4LjYuMSIsImFkciI6WyIxNzIuMTcuMC4xMjo5MjAwIl0sImZnciI6ImU4Nzk5NTdkMzY2MDYzYmViMjdiMjA4NTJmN2JjZjQwMzgwMTIxMzczMmU5Y2NmY2ZlZmFlMDZhNmYxMDUzZmUiLCJrZXkiOiJxQ2pLV0lZQjRtVFF3ZXU1a2RiWDowZFdqY1BwYVJfT1U5VUxKSGFpNmFRIn0=??Configure other nodes to join this cluster:? On this node:? Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.? Uncomment the transport.host setting at the end of config/elasticsearch.yml.? Restart Elasticsearch.? On other nodes:? Start Elasticsearch with `bin/elasticsearch --enrollment-token `, using the enrollment token that you generated.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
由于开启了ssl 认证,现在的访问地址是::9200/,访问结果如下:
继续点击高级继续前往,然后会提示输入账号密码 。
这里的用户名密码就是上面保存信息中: 和。
四、配置本地集群

二  Elasticsearch 基础之安装

文章插图
配置集群在提一次启动 时,第四个提示告诉我们如何去配置集群:
??Configure other nodes to join this cluster:? On this node:? Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.? Uncomment the transport.host setting at the end of config/elasticsearch.yml.? Restart Elasticsearch.? On other nodes:? Start Elasticsearch with `bin/elasticsearch --enrollment-token `, using the enrollment token that you generated.
其他节点操作:1、搭建三节点集群 ⑴、再准备两个节点
因为我只有一个节点 -8.6.1,现在把这个改为 node1 。
[root@VM-0-12-centos local]# mv elasticsearch-8.6.1 node1 [root@VM-0-12-centos local]# mkdir elasticsearch-8.6.1[root@VM-0-12-centos local]# mv node1/ elasticsearch-8.6.1/[root@VM-0-12-centos local]# cd elasticsearch-8.6.1/[root@VM-0-12-centos elasticsearch-8.6.1]# lsnode1
在 -8.6.1 内继续新建两个节点:node2,node3,并启动 node1 。注意这里新增的两个node 节点是从安装包中解压出来的没有启动过的节点,我试着直接用node1复制为node2却一直报错,只有使用全新节点才能启动成功 。