溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Windows10怎么搭建ElasticSearch集群服務

發布時間:2022-04-19 16:41:35 來源:億速云 閱讀:266 作者:iii 欄目:移動開發

這篇“Windows10怎么搭建ElasticSearch集群服務”文章的知識點大部分人都不太理解,所以小編給大家總結了以下內容,內容詳細,步驟清晰,具有一定的借鑒價值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“Windows10怎么搭建ElasticSearch集群服務”文章吧。

  • 復制文件

Windows10怎么搭建ElasticSearch集群服務image.png
  • 更改elasticsearch的配置文件elasticsearch.yml

# 設置集群名稱,集群內所有節點的名稱必需一致。cluster.name: my-esCluster# 設置節點名稱,集群內節點名稱必需唯一。node.name: node1# 表示該節點會不會作為主節點,true表示會;false表示不會node.master: true# 當前節點能否用于存儲數據,是:true、否:falsenode.data: true# 索引數據存放的位置#path.data: /opt/elasticsearch/data# 日志文件存放的位置#path.logs: /opt/elasticsearch/logs# 需求鎖住物理內存,是:true、否:false#bootstrap.memory_lock: true# 監聽地址,用于訪問該esnetwork.host: 192.168.0.114# es對外提供的http端口,默認 9200http.port: 9200# TCP的默認監聽端口,默認 9300transport.tcp.port: 9300# 設置這個參數來保證集群中的節點可以知道其它N個有master資格的節點。默認為1,對于大的集群來說,可以設置大一點的值(2-4)discovery.zen.minimum_master_nodes: 2# es7.x 之后新添加的配置,寫入候選主節點的設施地址,在開啟服務后可以被選為主節點discovery.seed_hosts: ["192.168.0.114:9300", "192.168.0.114:9301", "192.168.0.114:9302"] discovery.zen.fd.ping_timeout: 1mdiscovery.zen.fd.ping_retries: 5# es7.x 之后新添加的配置,初始化一個新的集群時需要此配置來選舉mastercluster.initial_master_nodes: ["node1", "node2", "node3"]# 能否支持跨域,是:true,在使用head插件時需要此配置http.cors.enabled: true# “*” 表示支持所有域名http.cors.allow-origin: "*"action.destructive_requires_name: trueaction.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false
# 設置集群名稱,集群內所有節點的名稱必需一致。cluster.name: my-esCluster# 設置節點名稱,集群內節點名稱必需唯一。node.name: node2# 表示該節點會不會作為主節點,true表示會;false表示不會node.master: true# 當前節點能否用于存儲數據,是:true、否:falsenode.data: true# 索引數據存放的位置#path.data: /opt/elasticsearch/data# 日志文件存放的位置#path.logs: /opt/elasticsearch/logs# 需求鎖住物理內存,是:true、否:false#bootstrap.memory_lock: true# 監聽地址,用于訪問該esnetwork.host: 192.168.0.114# es對外提供的http端口,默認 9200http.port: 9201# TCP的默認監聽端口,默認 9300transport.tcp.port: 9301# 設置這個參數來保證集群中的節點可以知道其它N個有master資格的節點。默認為1,對于大的集群來說,可以設置大一點的值(2-4)discovery.zen.minimum_master_nodes: 2# es7.x 之后新添加的配置,寫入候選主節點的設施地址,在開啟服務后可以被選為主節點discovery.seed_hosts: ["192.168.0.114:9300", "192.168.0.114:9301", "192.168.0.114:9302"] discovery.zen.fd.ping_timeout: 1mdiscovery.zen.fd.ping_retries: 5# es7.x 之后新添加的配置,初始化一個新的集群時需要此配置來選舉mastercluster.initial_master_nodes: ["node1", "node2", "node3"]# 能否支持跨域,是:true,在使用head插件時需要此配置http.cors.enabled: true# “*” 表示支持所有域名http.cors.allow-origin: "*"action.destructive_requires_name: trueaction.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false
# 設置集群名稱,集群內所有節點的名稱必需一致。cluster.name: my-esCluster# 設置節點名稱,集群內節點名稱必需唯一。node.name: node3# 表示該節點會不會作為主節點,true表示會;false表示不會node.master: true# 當前節點能否用于存儲數據,是:true、否:falsenode.data: true# 索引數據存放的位置#path.data: /opt/elasticsearch/data# 日志文件存放的位置#path.logs: /opt/elasticsearch/logs# 需求鎖住物理內存,是:true、否:false#bootstrap.memory_lock: true# 監聽地址,用于訪問該esnetwork.host: 192.168.0.114# es對外提供的http端口,默認 9200http.port: 9202# TCP的默認監聽端口,默認 9300transport.tcp.port: 9302# 設置這個參數來保證集群中的節點可以知道其它N個有master資格的節點。默認為1,對于大的集群來說,可以設置大一點的值(2-4)discovery.zen.minimum_master_nodes: 2# es7.x 之后新添加的配置,寫入候選主節點的設施地址,在開啟服務后可以被選為主節點discovery.seed_hosts: ["192.168.0.114:9300", "192.168.0.114:9301", "192.168.0.114:9302"] discovery.zen.fd.ping_timeout: 1mdiscovery.zen.fd.ping_retries: 5# es7.x 之后新添加的配置,初始化一個新的集群時需要此配置來選舉mastercluster.initial_master_nodes: ["node1", "node2", "node3"]# 能否支持跨域,是:true,在使用head插件時需要此配置http.cors.enabled: true# “*” 表示支持所有域名http.cors.allow-origin: "*"action.destructive_requires_name: trueaction.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false

如上方法依次啟動三個節點的,啟動完成之后可以看到三個節點成功


Windows10怎么搭建ElasticSearch集群服務

以上就是關于“Windows10怎么搭建ElasticSearch集群服務”這篇文章的內容,相信大家都有了一定的了解,希望小編分享的內容對大家有幫助,若想了解更多相關的知識內容,請關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女