Elasticsearch 基本配置及集群创建

1.jdk 1.8
2.配置jvm参数
    注:如果出现vm内存错误,可以参考下面的做法:

Elasticsearch uses a hybrid mmapfs / niofs directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions.

On Linux, you can increase the limits by running the following command as root:

sysctl -w vm.max_map_count=262144

To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf. To verify after rebooting, run sysctl vm.max_map_count.

The RPM and Debian packages will configure this setting automatically. No further configuration is required.

3.配置elasticsearch参数
    1.集群名 一个集群中的集群名必须相同
         cluster.name: elasticsearch_shiheng
    2.节点名 这是别的节点所能查看到的该节点的名称,可以不进行设置
         node.name: xxx.xxx
    3.主机名 这是和其他节点通讯的本机的ip
        network.host: 192.168.xxx.xxx
    4.自动发现的主机名 这里需要配置集群中所有的主机的ip,以便于集群中各节点之间互相发现。
        discovery.zen.ping.unicast.hosts: ["192.168.xxx.xxx", "10.10.111.98", "10.10.111.85", "10.10.111.86”]
    5.参与选举的最小数 应该为节点数目的一半加上一,防止脑裂
        discovery.zen.minimum_master_nodes: 2
    6.数据存放的位置
        path.data: /path/xxx
    7.日志存放的位置
        path.logs: /path/xxx
    5.其余各项可以使用默认值,如遇到端口号冲突等有问题的情况可再进行修改。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值