同一台机器配置两个elasticsearch7.6.2实例

使用软件版本:elasticsearch7.6.2

配置运行环境更改系统参数:

  1.  vim /etc/security/limits.conf
  2.  * soft nofile 65537
  3.  * hard nofile 65537
  4.  * soft nproc 65537
  5.  * hard nproc 65537 
  6.  vim /etc/sysctl.conf
  7.  vm.max_map_count = 262144
  8.  net.core.somaxconn = 65535
  9.  net.ipv4.ip_forward = 1

#1

cluster.name: my-application
node.name: node-1
node.master: true
node.data: true
path.data: /opt/es/forlinux7/es7-1/data
path.logs: /opt/es/forlinux7/es7-1/logs
network.host: 0.0.0.0
http.port: 9200
transport.port: 9300
discovery.seed_hosts: ["106.54.110.*:9300", "106.54.110.*:9301"]
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"

#2

cluster.name: my-application
node.name: node-2
node.master: false
node.data: true
path.data: /opt/es/forlinux7/es7-2/data
path.logs: /opt/es/forlinux7/es7-2/logs
network.host: 106.54.110.35
http.port: 9201
transport.port: 9301
discovery.seed_hosts: ["106.54.110.*:9300", "106.54.110.*:9301"]
cluster.initial_master_nodes: ["node-1", "node-2"]
http.cors.enabled: true
http.cors.allow-origin: "*"

猜你喜欢

转载自www.cnblogs.com/abthenzxy/p/12905789.html