Mac es + kibana 环境集群搭建
1.下载elasticSearch. 下载kibana,注意保持着两个版本一致, 安装的路径不能有中文;
es下载地址:https://www.elastic.co/cn/downloads/elasticsearch;
kibala下载地址:https://www.elastic.co/cn/downloads/kibana;
2.es解压三份之后文件,相当于三个节点服务
,
3.修改es服务下config/elasticsearch.yml 文件 主要修改绿背景色部分:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | # ======================== Elasticsearch Configuration ========================= # # NOTE: Elasticsearch comes with reasonable defaults for most settings. # Before you set out to tweak and tune the configuration, make sure you # understand what are you trying to accomplish and the consequences. # # The primary way of configuring a node is via this file. This template lists # the most important settings you may want to configure for a production cluster. # # Please consult the documentation for further information on configuration options: # https: //www.elastic.co/guide/en/elasticsearch/reference/index.html # # ---------------------------------- Cluster ----------------------------------- # # Use a descriptive name for your cluster: # 集群名称,多个要保持一致 cluster.name: app-hospital # # ------------------------------------ Node ------------------------------------ # # Use a descriptive name for the node: #节点名称,在集群中保持唯一 node.name: node1 # # Add custom attributes to the node: # #node.attr.rack: r1 # # ----------------------------------- Paths ------------------------------------ # # Path to directory where to store the data (separate multiple locations by comma): # #path.data: /path/to/data # # Path to log files: # #path.logs: /path/to/logs # # ----------------------------------- Memory ----------------------------------- # # Lock the memory on startup: # #bootstrap.memory_lock: true # # Make sure that the heap size is set to about half the memory available # on the system and that the owner of the process is allowed to use this # limit. # # Elasticsearch performs poorly when the system is swapping the memory. # # ---------------------------------- Network ----------------------------------- # # By default Elasticsearch is only accessible on localhost. Set a different # address here to expose this node on the network: #服务ip地址 network.host: 127.0 . 0.1 # # By default Elasticsearch listens for HTTP traffic on the first free port it # finds starting at 9200 . Set a specific HTTP port here: #服务端口号: http.port: 9200 #各个node节点数据传输的端口号 transport.tcp.port: 9300 #允许跨域访问 http.cors.enabled: true http.cors.allow-origin: "*" # # For more information, consult the network module documentation. # # --------------------------------- Discovery ---------------------------------- # # Pass an initial list of hosts to perform discovery when this node is started: # The default list of hosts is [ "127.0.0.1" , "[::1]" ] #集群各个node传输的ip+端口号,我这里ip都是 127.0 . 0.1 ,这个node节点数据传输端口号为 9300 ,其他两个分别为 9301 / 9302 discovery.seed_hosts: [ "127.0.0.1:9300" , "127.0.0.1:9301" , "127.0.0.1:9302" ] # # Bootstrap the cluster using an initial set of master-eligible nodes: #这个配置主要是竞选主节点,把需要的node节点信息都配置进去 cluster.initial_master_nodes: [ "127.0.0.1:9300" , "127.0.0.1:9301" , "127.0.0.1:9302" ] # # For more information, consult the discovery and cluster formation module documentation. # # ---------------------------------- Various ----------------------------------- # # Require explicit names when deleting indices: # #action.destructive_requires_name: true |
在这个基础上把其余两个es服务下config/elasticsearch.yml 文件都修改一下,改下node名称/端口号/node数据传输端口号,即可;
4.启动es服务,在cmd中切换到对应的es解压文件目录,通过bin/elasticsearch -d 依次启动。
5.检验es服务是否启动成功,通过在浏览器 localhost:9200/_cat/health 查看,如下图,green 状态,说明成功
6. 修改kibana的配置文件,/config/kibana.yml
主要修改:server.port: 5601
server.host: "localhost"
elasticsearch.hosts: ["http://127.0.0.1:9200","http://127.0.0.1:9201","http://127.0.0.1:9202"]
kibana.index: ".kibana"
启动kibana ,在cmd到对应的解压文件目录下,通过bin/kibana. -d 启动。
在浏览器localhost:5601 查看即可。效果图:
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端