美文网首页
Elasticsearch搭建及配置常见问题

Elasticsearch搭建及配置常见问题

作者: Sun_c39f | 来源:发表于2020-06-24 09:50 被阅读0次

Q:    can not run elasticsearch as root?

A:    因为elasticsearch不能再root下运行,我们需要创建一个用户和用户组,然后将elasticsearch用户组和用户变更,具体操作如下:

        adduser elasticsearch

        groupadd elasticsearch

        chown -R elasticsearch:elasticsearch elasticsearch-6.8.6

Q:    max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144] (最大虚拟内存太小)

A:    root@localhost vim /etc/sysctl.conf

       编辑以下内容:vm.max_map_count=655360

        执行以下命令sysctl -p

Q:max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] (无法创建本地文件问题,用户最大可创建文件数太小 )

#root@localhost vim /etc/security/limits.conf 

#编辑以下内容:

soft nofile 65536 

hard nofile 131072

soft nproc 2048

hard nproc 4096

Q:max number of threads [1024] for user [lish] likely too low, increase to at least [2048] (无法创建本地线程问题,用户最大可创建线程数太小)

A:#root@localhost vim /etc/security/limits.d/90-nproc.conf 

#编辑以下内容:

soft nproc2048

相关文章

网友评论

      本文标题:Elasticsearch搭建及配置常见问题

      本文链接:https://www.haomeiwen.com/subject/kqolfktx.html