zoukankan      html  css  js  c++  java
  • 在centos7 安装Elasticsearch 步骤:

    在centos7 安装Elasticsearch 步骤:

    1. 下载安装包
    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.14.1-linux-x86_64.tar.gz

    2. 解压
    tar -zxvf xxx

    3. 创建非root 用户
    useradd qizhi
    passwd xxx

    4. 赋予权限
    chown -R qizhi:qizhi xxx

    5. 切换用户启动
    su qizhi

    ./bin/elasticsearch -d

    6. 测试
    curl http://localhost:9200

    7. 修改配置文件

    #节点名称
    node.name: localhost.localdomain
    ##监听IP
    network.host: 192.168.157.132
    ##初始化设置
    cluster.initial_master_nodes: ['localhost.localdomain']

    8.  启动时遇到的问题
    [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
    [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]

    解决方案:

    切换到root用户
    编辑 /etc/security/limits.conf,追加以下内容;
    * soft nofile 65536
    * hard nofile 65536
    此文件修改后需要重新登录用户,才会生效
    [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    编辑 /etc/sysctl.conf,追加以下内容:
    vm.max_map_count=655360
    保存后,执行:
    sysctl -p
    重启

    9. 关闭防火墙,外部访问

  • 相关阅读:
    文本转换成音频流
    把文本以图片的形式保存
    list集合绑定在datagridview上时如何实现排序
    厘米转换成像素
    sql经典语句收集
    存储过程加密
    跨服务器sql操作
    lvs(+keepalived)、haproxy(+heartbeat)、nginx 负载均衡的比较分析
    [Big Data]Hadoop详解一
    CDN技术详解及实现原理
  • 原文地址:https://www.cnblogs.com/wqzn/p/15266779.html
Copyright © 2011-2022 走看看