zoukankan      html  css  js  c++  java
  • elasticsearch linux下安装

    1.下载elasticsearch    https://www.elastic.co/cn/downloads/elasticsearch

    2.解压,重命名

    tar -xzvf elasticsearch-7.5.0-linux-x86_64.tar.gz
    mv  elasticsearch-7.5.0   elasticsearch

    3.修改jvm内存

    cd  elasticsearch/config
    vim  jvm.options  # 修改为内存的一半  
      -Xms16g
      -Xmx16g

    4.配置 yml

    cluster.name: dy_comment
    node.name: node_3  
    node.master: true    
    node.data: true  
    path.data: /data/download/elasticsearch/data
    path.logs: /data/download/elasticsearch/logs
    network.host: 0.0.0.0 
    http.port: 9190 
    discovery.seed_hosts: ["192.168.0.120","192.168.0.121","192.168.0.122"]
    cluster.initial_master_nodes: ["192.168.0.120","192.168.0.121","192.168.0.122"] 
    http.cors.enabled: true
    http.cors.allow-origin: "*"
    indices.fielddata.cache.size: 8g
    bootstrap.memory_lock: true

    5.配置data,logs 都在elasticsearch目录下,配置用户权限,es不能root启动

    useradd  elasticsearch 
    passwd   elasticsearch
    
    # 添加权限
    chown -R elasticsearch:elasticsearch  /data/download/elasticsearch  

    6.系统优化   vim /etc/security/limits.conf

    * soft nofile 65536
    * hard nofile 65536
    * soft nproc 32000
    * hard nproc 32000
    * hard memlock unlimited
    * soft memlock unlimited

    7.vim  /etc/systemd/system.conf   

    DefaultLimitNOFILE=65536
    DefaultLimitNPROC=32000
    DefaultLimitMEMLOCK=infinity

    /bin/systemctl daemon-reload    # 使其生效

    8.vim  /etc/sysctl.conf

    vm.max_map_count=655360

    sysctl -p 生效

    使用supervisor 启动 es

    command=su -c "/data/download/elasticsearch/bin/elasticsearch" elasticsearch

  • 相关阅读:
    C#中的索引器
    ASP.NET中解决乱码问题
    System.Web.HttpContext.Current.Session为NULL值的问题?
    C# winForm 自定义鼠标样式的两种方法
    SQL中的排名函数
    VS2005打包项目(带卸载功能)
    HttpModule与HttpHandler
    怎样为你的SQLServer表选择索引 zt
    如何使用SQLDiag工具来追踪死锁错误 ZT
    几个性能调优相关的文章
  • 原文地址:https://www.cnblogs.com/elsons/p/14914793.html
Copyright © 2011-2022 走看看