Elasticsearch8版本安装详解,单节点部署、多节点部署、冷热温集群部署、IK分词器安装、简单生产安全模式配置(1)

官网文档:https://www.elastic.co/guide/en/kibana/8.1/introduction.html

解压:tar zxf /root/kibana-8.1.0-linux-x86_64.tar.gz -C /elasticsearch/elastic-cluster1

1、进入到解压目录

image-20230403192017283

2、编辑配置文件:vim kibana-8.1.0/config/kibana.yml

设置kibana的访问端口:server.port: 5601
主机所在的IP:server.host: ""
指定连接Elasticsearch的连接地址:elasticsearch.hosts: ["http://IP:端口"]

我配置如下:

image-20230403213338693

3、启动kibana

root用户启动:kibana-8.1.0/bin/kibana --allow-root

启动成功的截图如下,会生成一个url,复制下来把0.0.0.0换成IP地址,在访问

image-20230403213439712

4、输入elasticsearch的kibana令牌登陆

image-20230403213643229

5、输入账号密码:内置超级用户elastic

image-20230403214543023

6、添加或不添加都行,add或explore点哪个都行

image-20230403214709360

7、在kibana里验证一下,可以看到es的节点信息

image-20230403214903528

8、如果遇到这个信息,这个不是报错,可以看一下linux终端上的信息,kibana会输出6个数字,输入进去即可

image-20230512231422487

4、同一台服务器的elastic集群配置

4.1、生成新的elastic

单点部署完毕后来生成一个新的elastic,把之前的单点部署先停掉

1、把原有的配置都复制过去:cp -R elastic-cluster1/* elastic-cluster2/

image-20230403215518672

2、设置权限

image-20230403215255622

3、删除原有集群生成的数据和logs日志,不删除会报错:rm -rf esdata/* eslogs/*

image-20230403215608461

4、配置文件对比如下:

集群node-1
cluster.name: elasticsearch-cluster
node.name: node-1
path.data: /elasticsearch/elastic-cluster1/esdata
path.logs: /elasticsearch/elastic-cluster1/eslogs
network.host: 0.0.0.0
http.port: 9200
transport.port: 9300
discovery.seed_hosts: ["192.168.0.2:9300", "192.168.0.2:9301"]
cluster.initial_master_nodes: ["node-1", "node-2"]
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12

集群node-2
cluster.name: elasticsearch-cluster
node.name: node-2
path.data: /elasticsearch/elastic-cluster2/esdata
path.logs: /elasticsearch/elastic-cluster2/eslogs
network.host: 0.0.0.0
http.port: 9201
transport.port: 9301
discovery.seed_hosts: ["192.168.0.2:9300", "192.168.0.2:9301"]
cluster.initial_master_nodes: ["node-1", "node-2"]
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12
xpack.security.transport
  • 5
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
您可以通过以下步骤在Docker中部署Elasticsearch安装IK分词器: 1. 下载Elasticsearch镜像:使用以下命令从Docker Hub上获取Elasticsearch镜像: ``` docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.2 ``` 2. 创建并启动Elasticsearch容器:运行以下命令来创建并启动Elasticsearch容器: ``` docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.2 ``` 3. 重启Elasticsearch容器:使用以下命令重启Elasticsearch容器,以使IK分词器生效: ``` docker restart es ``` 4. 检查IK分词器是否已安装成功:您可以通过访问http://localhost:9200/_cat/plugins?v来查看已安装的插件列表。如果IK分词器已成功安装,您应该能够在插件列表中看到相关信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [ES基础篇 Docker部署的ES中安装IK分词器](https://blog.csdn.net/u010088278/article/details/131025204)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [如何在Docker环境下配置Es自定义分词器(ik)?](https://blog.csdn.net/Blue92120/article/details/130195635)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值