elasticsearch5.4.3、kibana分布式安装
設置elasticsearch
兩臺機器:
master ip 192.168.31.106
slave ip 192.168.31.162
master ?elasticsearch.yml
bootstrap.memory_lock: false bootstrap.system_call_filter: falsenode.name: node-1 node.master: true node.data: true network.bind_host: 192.168.31.106 network.publish_host: 192.168.1.106 network.host: 0.0.0.0 http.max_content_length: 1024mb discovery.zen.ping.unicast.hosts: ["192.168.31.162"] http.cors.enabled: true http.cors.allow-origin: "*" discovery.zen.ping_timeout: 10s discovery.zen.minimum_master_nodes: 2 discovery.zen.fd.ping_timeout: 10000s discovery.zen.fd.ping_retries: 10The?discovery.zen.ping_timeout?(which defaults to?3s) determines how long the node will wait before deciding on starting an election or joining an existing cluster.?
discovery.zen.fd:
| ping_timeout | How long to wait for a ping response, defaults to?30s. |
?
ES在大量插入數據時會產生gc overhead 錯誤,在gc overhead 過程中會進入stop-the-world狀態,導致ping不通,因此調整ping的時間長度
slave?elasticsearch.yml
bootstrap.memory_lock: false bootstrap.system_call_filter: falsenode.name: node-2 node.master: true node.data: true network.bind_host: 192.168.31.162 network.publish_host: 192.168.1.162 network.host: 0.0.0.0 http.max_content_length: 1024mb discovery.zen.ping.unicast.hosts: ["192.168.31.106"] http.cors.enabled: true http.cors.allow-origin: "*" discovery.zen.ping_timeout: 10s discovery.zen.minimum_master_nodes: 2 discovery.zen.fd.ping_timeout: 10000s discovery.zen.fd.ping_retries: 10設置node.master: true ,兩臺機器哪個先啟動,哪個就是master。
設置kibana
server.host: "0.0.0.0" elasticsearch.url: "http://192.168.1.162:9200"設置ElasticSearh-head
下載elasticsearch-head
cd /path/to/elasticsearch-head
npm install -g grunt-cli
npm install
grunt server
http://localhost:9100/
?
總結
以上是生活随笔為你收集整理的elasticsearch5.4.3、kibana分布式安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Mysql5.7读写分离
- 下一篇: 安装 elasticsearch-hea